0% found this document useful (0 votes)
0 views11 pages

Hb Algorithm

The document presents the HB Algorithm, which aims to determine the best finite bundle of products by maximizing utility while minimizing expenses. It discusses the concepts of expenditure minimization and utility maximization in economics, establishing a generalized function for optimal decision-making in consumer choices. The paper also explores various demand functions and utility functions, including Cobb-Douglas, CES, and quasi-linear functions, to analyze consumer behavior and preferences.

Uploaded by

souryadeepta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views11 pages

Hb Algorithm

The document presents the HB Algorithm, which aims to determine the best finite bundle of products by maximizing utility while minimizing expenses. It discusses the concepts of expenditure minimization and utility maximization in economics, establishing a generalized function for optimal decision-making in consumer choices. The paper also explores various demand functions and utility functions, including Cobb-Douglas, CES, and quasi-linear functions, to analyze consumer behavior and preferences.

Uploaded by

souryadeepta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

International Journal Of Engineering Research And Development

e- ISSN: 2278-067X, p-ISSN: 2278-800X, [Link]


Volume 20, Issue 8 (August, 2024), PP. 477-487

An Algorithm to Choose the Best Finite Bundle of


Products: HB Algorithm
Souryadeepta Majumdar1, Om Prakash Tiwari2
1
Data Science and Applications
2
Data Science and Applications
Indian Institute of Technology Madras, Chennai, INDIA

Choosing a particular good or service always depends on the utility that we can expect from it. In different
activities, a moment arrives when we need to choose one specific function, object, material, or generally, an entity,
comparing to other similar entities based on the maximum efficiency that can be obtained with the least expenses
of inputs. In economics, there are two famous problems on this same situation, namely, the Expenditure
Minimization Problem (EmP) and the Utility Maximization Problem (UMP). However, there is a solution curve
to both of these problems and when the curves of the individual functions attain monotonicity, we obtain a solution
of UMP and EmP. This work focuses on establishing a generalized function for computing maximized utility of a
function with minimum expenses. Further it gives a suitable approach that can be used to find the best finite
bundle of products for a consumer.
---------------------------------------------------------------------------------------------------------------------------------------
Date of Submission: 23-08-2024 Date of Acceptance: 03-09-2024
----------------------------------------------------------------------------------------------------------------------------- ----------

I. INTRODUCTION
In microeconomics and consumer theory, the expenditure minimization function has been a huge addition
to the domain. This helps in a decision-making of the user while purchasing a service. If we see in mathematical
sense, there are multiple algorithms and approaches to a particular problem. Suppose, we know the number of
inputs required for each algorithm to solve this particular problem is known. Now, based on our preferences and
a given constraint number of inputs, we must choose the most efficient algorithm out of the set. However, choosing
a particular entity, be it a function or a service depends on the budget or the total estimated inputs we wish to
invest to get the output and also depends on preference along with its utility. However, keeping the budget fixed,
there are two different conditions. One is, what is the maximum utility of a particular entity that one can expect
and the other is, provided that we have a fixed expected utility, what is the minimum input we need to provide.
However, in order to fulfil and have an optimal solution where we actually have a fixed budget and we pay a
minimal input to get the maximum possible utility, we get a supply to the “demand” of such a function or service.
Talking in context, the functions of EmP and UMP arrive at a monotonicity when we get such a solution. Based
on the constraints of demands (fixed utility, fixed expenditure and others), there are different demand functions
namely – the Hicksian demand, the Marshallian demand and the Slutsky demand. Catering through all these
demands, the purpose of this paper is establishing an algorithm and set of expressions to find the maximum utility
and the minimum price one needs to pay for achieving that utility. However, further using Statistical techniques,
this helps in figuring out the best finite set of product bundles or entity bundle that can be obtained and have
equivalent effect of utility and lesser expenses involved. This selection helps in multiple domains apart from its
core fields like Economics, Data Science and Applied Statistics and also helps in choosing the right bundle for
optimization problems in Engineering where several parts, materials, algorithms or fluids are needed to be chosen
from a huge set of available resources.

II. DEMAND
In general, demand can be termed as the willingness to avail a good or service or approaching a particular
function. In other words, when a particular function is approached for solving a problem, a “demand” is created
for that function. This demand is based on utility, expenditure, preferences and budget. An equilibrium of utility,
expenditure and preference sets a significant demand for the entity. To cater the quantity of service needed to be
availed, there are different demand functions that are being used.
Demands can be categorized based on different scales of requirement, quantity and different constraints.
The different demands involve Market demand (cumulative demand of a product in a market), Individual demand
(demand by a single consumer), Cross demand (demand of good when the price of another good is changed), Price
demand (demand that varies due to price of the good), Direct demand (demand for goods and services that are
directly consumed by the individuals to satisfy needs and wants), Derived demand (demand of a particular good

477
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

or service due to increased demand of another good or service), Income demand (demand based on income level
of consumers), Composite demand (demand of a good that has multiple uses), Latent demand (demand for a good
or service whose desire has not currently been met in the market due to lack of availability or awareness), Elastic
demand (demand that varies highly with change in price), Inelastic demand (demand that varies less with change
in price and usually caters needs of the individual) and Aggregate demand (total demand of goods and services in
a given time period at a price level in an economy).
Wu (2023) has explained how the type of good influences income that affects budget of a consumer and
in turn manipulates demands. In fact, not only economically, the impacts of demand are driven through
psychological and artificially nudged economic behavior towards the market. Rachlin et al. (1976) showcases two
experiments with rats to show how consumption of commodities changed when changes were introduced to the
budget. Needs and wants, in other words, essential and non-essential goods consumption were affected and
substitution patterns were observed by reinforcement in the budget.
This leads us to thinking on the point that how can demands be compensated or met. Based on the
compensation of demands, different demand functions have been concluded, namely, the Hicksian demand
function, the Marshallian demand function and the Slutsky demand function. The Demand functions are derived
from Indirect Utility functions and Expenditure functions. These functions help us to analyze the scenario that are
required to fulfil the demands of the consumers for a particular good or service possessing some utility.

III. UTILITY AND ITS FUNCTIONS


Utility in general defines the value of goods and services. Utility can be equated to the state of
satisfaction, well-being or happiness but does not possess an exact definition [1]. Kapteyn (1985) has plotted the
measurability of utility as an entity and mentions it as an ordinal quantity where a higher value representing utility
in the plot corresponds a higher utility. The biggest point in computing utility as a statistical value is to use it as a
metric to satisfy as a demand. The factors affecting the value of utility of a product involve income, budget,
preference of a product by a consumer, price of the product and marginal utility of each product. When we have
multiple such products in the market, we compute the utility using the mentioned factors. There are specifically
constructed functions take into consideration these factors and output is the utility of the targeted product. These
functions are called utility functions and are mainly of three types: Cobb – Douglas, CES and quasi – linear [5].

3.1 Cobb – Douglas Function


The Cobb – Douglas function deals with products and their preferences on a particular utility scale that determines
the utility that can be derived by using that particular combination of products. Considering the traditional form
of the utility function, we get the following format:

𝛽
𝑈(𝑥1 , 𝑥2 ) = 𝐴𝑥1𝛼 𝑥2 (3.1)

where U(x1,x2) (also denoted as U*) is the derived utility, A is a non-negative constant representing scalability
factor, x1 and x2 representing the quantity of goods used (can be price or physical quantity) and the constants
and  represent the relative preferences of each of the commodities. It is to be noted that the sum of relative
preferences is always 1 and hence  However, we can write a generalized function for it where we
consider it for n products. Defining the consumption quantity of the products as x 1, x2, ..., xn, their corresponding
relative preferences being …, n, we derive at equation (3.2a) that follows the conservation rule stated in
equation (3.2b)

𝛼
𝑈(𝑥1 , 𝑥2 , . . , 𝑥𝑛 ) = 𝐴 ∏𝑛𝑖=1 𝑥𝑖 𝑖 (3.2a)

Where,

∑𝑛𝑖=1 𝛼𝑖 = 1 (3.2b)

The utility when two different products are in use can be plotted as a function of two independent random
variables. If we consider the scalability constant as 1 and the relative preferences for two products being 0.7 and
0.3 (values of and  respectively), we get the following behavior as plotted in Figure 1.

478
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

Figure1: Graphical Representation of Cobb-Douglas Utility function

Figure 1 plots the utility U* along z-axis, product with preference 0.7 along x-axis and product with preference
0.3 along y-axis. Clearly observing the output as plotted along the z coordinates, the function is concluded to be
of monotonically increasing nature.

3.2 CES Utility Function


Constant Elasticity of Substitution (CES) is the property which states that proportional changes in relative prices
to relative quantities is constant. The expression for this function for a set of n commodities from x1 to xn with
relative preferences 1 to n such that ∑𝑛𝑖=1 𝛼𝑖 = 1. Along with these, there is an elasticity parameter  which is a
numerical parameter that determines how easily can we substitute a product with another. It is derived from the
elasticity of substitution which denotes the willingness of consumers to substitute one good with another.
Elasticity of substitution is given by
1
𝜎= (3.3)
1−𝜌
CES utility function can be written as a linear combination in the following way
1
𝜌
𝑈 ∗ = (∑𝑛𝑖=1 𝛼𝑖 𝑥𝑖 )𝜌 (3.4)
This can be written as a more complex linear transformation where we also add the scalability factor. In that case
we can consider the individual preferences to be 1 to n. Keeping the scalability factor as A, CES can be written
in another way as
1
𝜌
𝑈 ∗ = 𝐴(∑𝑛𝑖=1 𝛽𝑖 𝑥𝑖 )𝜌 (3.5)
The nature of this function can be seen in Figure 2. Similar to Cobb-Douglas Utility, the CES Utility function is
also monotone increasing function. For a simpler visualization, a three-dimensional graph is created consisting of
two products x1 and x2 with preferences 0.7 and 0.3 respectively. The elasticity parameter is set to m. For simple
computations, scalability factor A is set to 1. The different subparts of Figure 2 show the condition at a particular
value of m.

479
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

Figure 5a: CES Utility Function at m=-1.1 Figure 4b: CES Utility Function at m=0.6

Figure 3c: CES Utility Function at m=0.5 Figure 2d: CES Utility Function at m=0.8

It is observed that the graphs are repeating periodically with a constant multiplicative factor. For instance, if we
take a non-zero and non-negative real number n, then the nature of graph is similar to figure 2b at m=6n. Similarly
figure 2d is observable at m=8n. However, this is to be noted that m cannot be a negative value and Figure 2a is
a theoretical scenario.

3.3 Quasi-Linear Utility Function


As the name suggests, this utility function is combination of a pre-existing function and variables. The pre-existing
function may not be linear but the resulting function makes it a linear structure hence, quasi-linear. Considering a
set of n products from x1 to xn, a pre-existing function can be written till xn-1 and the quasi-linear expression can
be written as
𝑈 ∗ = 𝑓(𝑥1 , 𝑥2 , . . . , 𝑥𝑛−1 ) + 𝑐𝑥𝑛 (3.6)
where c is a constant. However, instead of one single function it could be combination of multiple functions some
of whose forms are represented in equations 3.7 and 3.8. Equation 3.7 shows that if all variables till xn-1 contains
their own function f(x), then U* is represented in the following way
𝑈 ∗ = ∑𝑛−1
𝑖=1 𝑓(𝑥𝑖 ) + 𝑐𝑥𝑛 (3.7)
Now, suppose there are different functions with different combination of variables which can be used to form a
quasi-linear utility function expression as shown in equation 3.8.
𝑈 ∗ = 𝑓(𝑥1 , 𝑥2 ) + 𝑓(𝑥3 , 𝑥7 , 𝑥11 ) + 𝑓(𝑥4 , 𝑥9 ) + ⋯ + 𝑐𝑥𝑛 (3.8)
However all composite forms of this expression can be simplified and written in a form as shown in equation 3.6.

All the forms of utility functions that have been seen so far can be manipulated and used to derive other utility
functions, compute other economic terms like expenditure and demand and also can be interchanged among each
other. For instance, if we want to compute Marshallian demands for two products x1 and x2 with equal preferences
, the utility maximization problem with CES utility function can be stated as

480
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

max 𝑢(𝑥1 , 𝑥2 ) = 𝑥1𝛼 + 𝑥2𝛼


{
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑝1 𝑥1 + 𝑝2 𝑥2 = 𝑦
where p1 and p2 are prices of the corresponding products. Now forming the Lagrangian function L for the same to
compute the first order condition, we get
𝐿 = 𝑥1𝛼 + 𝑥2𝛼 − 𝜙(𝑝1 𝑥1 + 𝑝2 𝑥2 − 𝑦)
with  as the Lagrangian multiplier, the conditions are
𝜕𝐿
= 𝛼𝑥1𝛼−1 − 𝜙𝑝1 = 0 (3.9)
𝜕𝑥1
𝜕𝐿
= 𝛼𝑥2𝛼−1 − 𝜙𝑝2 = 0 (3.10)
𝜕𝑥2
𝑝1
hence computing the Marginal Rate of Substitution (MRS), we get by simplifying and dividing equation 3.9
𝑝2
𝑥 𝛼−1
by 3.10. The resulting MRS is hence ( 1 ) . On the other hand, maximization on Cobb – Douglas will have the
𝑥2
following expression for utility maximization
𝑢(𝑥1 , 𝑥2 ) = 𝑥1𝛼 𝑥2𝛼
Now computing the indifference curve for the Cobb – Douglas form, we get to see that the indifference curves
𝑥
satisfy the MRS = 1 [5] which imply that indifference curve of Cobb – Douglas depends on proportional values
𝑥2
of the products and not the absolute value of the products. Similarly when MRS of CES has  value 0 then MRS
𝑥 −1 𝑥
is ( 1 ) or ( 2 ). Hence the indifference curve is similar to that of Cobb – Douglas indifference curve and hence
𝑥2 𝑥1
at 0 preference, CES becomes Cobb – Douglas. Further a brief into indirect utility and demand functions will lay
the fundamentals to the maximization and minimization problems.

IV. THE INDIRECT UTILITY FUNCTION – OUTPUT TO UMP


The indirect utility function lays the foundation to a well-known problem of consumer theory known as
the Utility Maximization Problem. First studied and discovered by Antonelli (1886), it gives the maximum utility
that a consumer can achieve by using a particular product for a given price of the product and a given income of
the consumer. In fact, mathematically, it is expressed as a function of income and price of goods. Sakai (1977)
shows a duality of direct and indirect utility functions through axioms [7]. Briefly, the direct utility function is a
computational output that expresses utility as a quantitative measurement. In other words, it is a function that
provides utility of a product based on the quantity consumed. However, the indirect utility function is dependent
on direct utility to some extent and can be expressed mathematically as shown in equation 4.1. If we consider a
set of n products with prices from p1 to pn, consumed quantities x1 to xn and income I, then the indirect utility
function V(p1,p2, … , pn, I) as a function of direct utility function U(x1, x2, … , xn), price, quantity and income
will be expressed as
𝑉(𝑝1 , 𝑝2 , … , 𝑝𝑛 , 𝐼) = 𝑚𝑎𝑥𝑥1 ,𝑥2,…,𝑥𝑛 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 )
{ (4.1)
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 ∑𝑛𝑖=1 𝑝𝑖 𝑥𝑖 ≤ 𝐼
Some of its remarkable properties lead to utility maximization. One of these involve the nature of non-
decreasing utility nature with increasing income. As per this, the utility remains constant or increases as the income
increases. However, if the price increases, the utility remains constant or decreases and hence providing a non –
increasing nature of prices. The term of ‘indirectness’ is directly related to the behavior of consumers in the aspect
of ‘utility’ where they think that direct utility is the associated function for choosing the bundle of products where
choice is based on the quantity of products consumed. However, indirect utility shows the impact of price and
income that is involved in choosing the perfect bundle. The utility functions that have been studied in section III
can be used as a direct utility function which can be further utilized to derive the indirect utility. This justifies that
direct utility can be Cobb – Douglas, CES or quasi – linear. However, observing the nature of the indirect utility
function, it is quasi – concave in income, hence showing concave nature when derived from income. Hence, with
an increasing indirect utility, marginal utility decreases. Observing the indirect utility for different forms of utility
functions will help us to observe and study how different forms of utility functions affect the indirect utility. For
Cobb – Douglas utility involving two variables, preferences  and , if income is I and prices are p1 and p2
respectively for consumed quantities x1 and x2, utility can be computed using the expression derived in equation
4.2. For deriving the expression, the value of A is set to 1 and the variables are substituted in equation 3.1 which
is used for the base function. Further, Lagrange Multipliers are used for each product to derive the optimal utility
of consumption for each product (denoted as x1* and x2*) and finally these values are substituted from the
𝜕𝐿 𝜕𝐿
expressions of and to get x1* and x2* and finally the indirect utility expression is achieved. Considering
𝜕𝑥1 𝜕𝑥2
CES, if consider the products x1 and x2 with importances ‘a’ and ‘b’ and prices p1 and p2 respectively, then the
indirect utility for elasticity  is derived in equation 4.3. For constant elasticity, we use Lagrangian partial
derivatives to find the maximized utility expression and hence derive the expression for optimal consumption.

481
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm
1
𝑝2 𝑎 𝜌−1 𝐼 𝐼
This is given by 𝑥1 = ( ) × 1 and 𝑥2 = 1 . Using this in the utility expression where
𝑝1 𝑏 𝑝 𝑎 𝑝 𝑎
𝑝1 ( 2 )𝜌−1 +𝑝2 𝑝1 ( 2 )𝜌−1 +𝑝2
𝑝1 𝑏 𝑝1 𝑏
n is set to 2 and all assumptions are mentioned, then we get the expression for indirect utility when the utility is
CES.
𝛼 𝛼 𝛽 𝛽𝐼 𝛼+𝛽
𝑉(𝑝1 , 𝑝2 , 𝐼) = ( 𝛽 ) (4.2)
𝑝1𝛼 𝑝2
1
𝜌 𝜌 𝜌
1
𝑝2 𝑎 𝜌−1 𝐼 𝐼
𝑉(𝑝1 , 𝑝2 , 𝐼) = (𝑎 (( ) × 1 ) ) + (𝑏 ( 1 ) ) (4.3)
𝑝1 𝑏 𝑝 𝑎 𝑝 𝑎
𝑝1 ( 2 )𝜌−1 +𝑝2 𝑝1 ( 2 )𝜌−1 +𝑝2
𝑝1 𝑏 𝑝1 𝑏
( )
Further the expenditure function will be explained and using indirect utility and expenditure function to derive the
demand functions and study the demand functions. These will lead to the two highlighted problems whose solution
can be found using the algorithm proposed further.

V. EXPENDITURE FUNCTION – THE OUTPUT OF EmP


Put forward in the Consumer Theory by Deaton (1986), the expenditure function is the centric model for
computing utility and preferences and plays an important role in Demand Theory as it combines with the indirect
utility function to create the demand functions and hence obtain the demand curves. In general, it helps in
computing the minimum amount that a person needs to pay to achieve a particular utility level for a product. In
simple terms consider a utility function U(x) which gives the utility limit U and an n – dimensional price vector
𝑝⃗ = (𝑝1 , 𝑝2 , … , 𝑝𝑛 ) for a quantitative vector 𝑥⃗ = (𝑥1 , 𝑥2 , … , 𝑥𝑛 ) implying quantity of goods, then the expenditure
function 𝑒(𝑝⃗, 𝑈) is given by
𝑒(𝑝⃗, 𝑈) = min{𝑝⃗ ∙ 𝑥⃗: 𝑈(𝑥⃗) ≥ 𝑈}
𝑥
However, we can rewrite the above equation by set of tuples such that ep is a binary relation between price and
quantity which can be topologically represented on a convex cone where 𝑝⃗ and 𝑈(𝑥⃗) are two vectors representing
price and utility limit (quantitative for quantity x) on the topologically convex vector space  that contains the
convex cone X. Then ep is a reflexive and transitive binary relation termed as preorder and is represented as
𝑒𝑃 (𝑝⃗, 𝑈) = ⋀{𝑝⃗ ∙ 𝑥⃗|𝑈(𝑥⃗) ≥ 𝑈}
𝑥⃗∈𝑋
here 𝑈 is the desired utility level. There are several works, first led by Divisia (1928) that shows duality of
expenditure function and indirect utility function. Glancing into the properties of the expenditure function, it
possesses a non – decreasing nature with prices and hence increases as price of product(s) increases. However, it
also shows concavity with prices as the prior goal of consumers is to minimize the expenditure to get their desired
utility. At degree 1 of expenditure function, homogeneity is observed with prices. Checking the expenditure
function for two products x1 and x2 with relative preferences  and , prices p1 and p2, having the utility level u,
then, for Cobb – Douglas, the utility function is equation 3.1, and the expenditure function becomes
𝛽
𝑒(𝑝1 , 𝑝2 , 𝑢) = 𝑢 ∙ 𝑝1𝛼 ∙ 𝑝2
Similarly, for CES, when elasticity is  the utility function is given by equation 3.4, if n is set to 2 and all the
variables have same definition as in equation 3.4 with prices p 1, p2 and utility level being u then the expenditure
function is given by
1−𝜌
𝜌 𝜌 𝜌
𝑝1 𝜌−1 𝑝2 𝜌−1
𝑒(𝑝1 , 𝑝2 , 𝑢) = 𝑢 ( 1 ) 1 +
𝛼1 𝛼2 1−𝜌 1−𝜌

This function can be used in optimizing costs of consumption based on desired utility levels and hence can be
used when dualled with indirect utility function to find the minimum cost required to get the maximum utility
from any entity. Applications of expenditure minimization vary from using it in conventional ways of cost analysis
for different products in the financial market to finding the minimum weighted path used to traverse a tree in graph
theory.
In Sections IV and V, we have studied the backbone functions for the Utility Maximization Problem and the
Expenditure Minimization Problem respectively. Briefly looking into the statements of UMP and EmP, the
importance of demand curves and their types will be studied, that will further lead to the creation of the algorithm.

482
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

VI. UMP & EmP: A BRIEF OVERVIEW


Considering the most important two problem statements from the 20 th century which created the major segment
of Consumer Theory, supported the Demand Theory and finally the whole branch of Microeconomics, the Utility
Maximization Problem and the Expenditure Minimization Problem will be briefly discussed here.

6.1 Utility Maximization Problem: This particular problem, simply provides the maximum utility, that a
consumer can afford, provided that they have a fixed income or a budget. This willingness to consume the
particular utility is the phenomenon which we call as a demand. Now, there are a few parameters which complete
the checks of a demand that can be fulfilled using UMP. The first check is following the trajectory set by a French
economist Léon Walras (1874) who stated the Walras Law [17] where one checks three states of preferences of a
consumer to judge the existence of the utility to fulfil the demand. So, the preferences of the consumer must by a
complete preference firstly. In this, either the products that are being compared in the bundle are indifferent (i.e.,
does not contain any distinct difference) or the consumer must have a distinct preference of one product over the
others. Hence for a set of n products {𝐴1 , 𝐴2 , … , 𝐴𝑛 } there must be either a product Ai which has the highest
preference or all the products must be indifferent. Secondly, a monotonic preference must be existing. Considering
the set of n products, if we consider a product Ai such that, a minor increment in quantity of Ai is made, then the
preference is monotonic if the consumer prefers Ai more than others. Strict preference to higher quantity with
same utility level must be existing to conserve the preference. Equation 6.1a and 6.1b are the conditions for
monotonic preference. Further, once monotonic preference is established, a transitive preference is also needed
for ensuring consistency in preferences of the consumer.
{𝐴1 , 𝐴2 , … , 𝐴𝑖 + 𝛿, … , 𝐴𝑛 } ≽ {𝐴1 , 𝐴2 , … , 𝐴𝑖 , … , 𝐴𝑛 } (6.1a)
{𝐴1 + 𝛿, 𝐴2 + 𝛿, … , 𝐴𝑖 + 𝛿, … , 𝐴𝑛 + 𝛿} ≻ {𝐴1 , 𝐴2 , … , 𝐴𝑖 , … , 𝐴𝑛 } (6.1b)
Following all these three states of preferences confirm validation of Walras law. Now, if the Walras law is
validated, then the optimal demand lies along the budget line, which represents the budget constraint, one of the
four checks to see whether UMP is applicable or not. The budget constraint is expressed in equation 6.2. Further,
when this optimal solution is existing, the Lagrangian functions for the utilities are partially differentiated to find
the Marginal utility from tangential conditionality and a third check is done which confirms that the ratio of
Marginal utility of a product to the price of the product is constant within the vector space containing the marginal
utilities and the prices of the products (equation 6.3). Finally, the budget constraint is set as per the income of the
consumer and completes the fourth check for validating the existence of UMP. The prices are defined as
{𝑝1 , 𝑝2 , … , 𝑝𝑛 } for corresponding products, income is taken as I and quantity of consumption of each product is
given by {𝑥1 , 𝑥2 , … , 𝑥𝑛 }.
∑𝑛𝑖=1 𝑝𝑖 𝑥𝑖 ≤ 𝐼 (6.2)
As per Walras law, when the law is satisfied, then 6.2 is modified to
𝑛

∑ 𝑝𝑖 𝑥𝑖 = 𝐼
𝑖=1
Further, the tangential conditionality gives a check to the phenomenon transited from defense to economics known
as ‘Bang for your buck’[19] and is given by
𝑀𝑈𝐴1 𝑀𝑈𝐴2 𝑀𝑈𝐴𝑛
= =⋯= (6.3)
𝑝𝐴1 𝑝𝐴2 𝑝𝐴𝑛
This gives the Utility Maximization Problem, which considers a utility function U(x 1, x2, … , xn) and the budget
constraint as explained in equation 6.2 and combines them to give
max 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 )
𝑛
{
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 ∑ 𝑝𝑖 𝑥𝑖 ≤ 𝐼
𝑖=1
The output provides a bundle {𝑥1∗ , 𝑥2∗ , … , 𝑥𝑛∗ } which contains those products which combine to give maximum
utility to the consumer.

6.2 Expenditure Minimization Problem: The expenditure minimization problem or the EmP, which is the
dual of UMP, provides the expenses one needs to make to achieve the desired level of utility. First laid into
discussion by Paul Samuelson (1947), this analyzes the desired utility that a consumer wants to achieve, provided
that they have a particular utility level and needs to spend the minimum possible amount for the same. However,
addressing the numerical amount that the consumer needs to pay to avail these utilities is given by the expenditure
function of section V and the product bundle that could be suggestively listed to spend the minimum is given by
the Hicksian demand which is discussed in topic 7.1. The statement for EmP can be mathematically be written as

483
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm
𝑛

min ∑ 𝑝𝑖 𝑥𝑖
{ 𝑥1 ,𝑥2 ,…,𝑥𝑛
𝑖=1
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) ≥ 𝑈0
where {𝑥1 , 𝑥2 , … , 𝑥𝑛 } is the set containing quantity consumed for each product, 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) is the utility
function for the n products and U0 is the desired or minimum expected utility limit. The demand that is being
fulfilled here has a limiting utility that needs to be checked for getting the most desirable output. Even when there
is a change in prices, the utility limit is checked such that it remains the same or is higher than the lower utility
limit. Hence, we can say that all demands are compensated and the compensation variation is checked upon. Most
of the outputs of the EmP lies with the nature of demand and hence a wider analysis into the demand curves will
help in understanding the nature of outputs from these two problems and hence understanding the functionality of
the HB algorithm which will be further declared.

VII. DEMAND FUNCTIONS


Using the indirect utility function and the expenditure function from the sections IV and V, the demand
functions are obtained. Plotting these functions give the demand curves which helps us in justifying the nature of
the demand, optimal utilities and solutions to different points. These play a very vital role in behavioral economics
where variations in the demand curves help in determining the effect of utility, quantity or other specific variations
on the consumption pattern of products. These variations are often termed as elasticities which vary due to income,
price of product or even cross – price which means that due to change in price of one product, consumption
quantity of another product may get affected. There are broadly three types of demand functions which one can
find in economics, namely – Hicksian demand, Marshallian demand and Slutsky demand. Out of these, the
Hicksian demand and the Marshallian demand are the most studied functions as they form the backbone for this
domain. Insights into these functions will help us understand the solutions of UMP and EmP and further the form
of solution that is expected from the HB algorithm.

7.1 Hicksian Demand: The Hicksian demand or the compensated demand is the phase where the consumer
gets to know which bundle of products need to be chosen, provided that the target minimum utility is constant and
the price paid for the same is the minimum. Named after John Hicks, this function is the solution for the
Expenditure Minimization Problem. The main focus of this demand function is to address how the expenses can
be minimized without compromising the utilities. Mathematically stating the Hicksian demand can be stated as
ℎ(𝑝⃗, 𝑈) = 𝑎𝑟𝑔 min{𝑝⃗ ⋅ 𝑥⃗|𝑈(𝑥⃗) ≥ 𝑈}
𝑥⃗∈𝑋
where ℎ(𝑝⃗, 𝑈) is the demand function and 𝑝⃗ and 𝑥⃗ are the price and quantity vectors contained in a topological
vector space X where X = ℝ𝑛+ . Similarly, U is the minimum limit of utility contained in the vector space X and
ℎ: ℝ𝑛+ → ℝ. 𝑈(𝑥⃗) is the utility function which keeps a check on the utility limit. The function can be derived from
expenditure function by using Lagrangian multiplier. Provided that the vectors and variables remain the same,
using EmP, if a Lagrangian multiplier is denoted by , the Lagrangian function ℒ is given by
𝑛

ℒ(𝑥1 , 𝑥2 , … , 𝑥𝑛 , 𝜆) = ∑ 𝑝𝑖 𝑥𝑖 + 𝜑(𝑈 − 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ))


𝑖=1
checking in the first-order conditions for the function with respect to i-th product, we get
𝜕ℒ 𝜕𝑈
= 𝑝𝑖 − 𝜑 =0
𝜕𝑥𝑖 𝜕𝑥𝑖
𝜕ℒ
= 𝑈 − 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 0
𝜕𝜑
Hence, we get price of the i-th product to be
𝜕𝑈
𝑝𝑖 = 𝜑
𝜕𝑥𝑖
𝑝 𝜕𝑈
which gives  as 𝜕𝑈𝑖 which is constant for all cases. Note that is the marginal utility for the i-th product. To
𝜕𝑥𝑖
𝜕𝑥𝑖
get the Hicksian demand ℎ𝑖 (𝑝⃗, 𝑈) for the i-th product, it applies to the utility constraint such that
𝑈(ℎ1 , ℎ2 , … , ℎ𝑛 ) = 𝑈
This, in turn, gives the set of outputs for all h i for 1 ≤ i ≤ n. This is one way of deriving the Hicksian demand by
using utility constraint. Another way is using Shepherd’s Lemma which uses the expenditure function 𝑒(𝑝⃗, 𝑈) and
states that the positive gradient of the expenditure function with respect to price of i-th product is hi. It is given by
ℎ(𝑝⃗, 𝑈) = ∇𝑝𝑖 𝑒(𝑝⃗, 𝑈)

484
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

this is the compensated demand or Hicksian demand and further we will see how is it different from the ordinary
demand or the Marshallian demand by studying the Marshallian demand. However, correlating to the algorithm
that has been proposed, it uses Hicksian demand as the solution.

7.2 Marshallian demand: Ordinary demand or Marshallian demand, which is named after economist Alfred
Marshal, which provides information to the consumers on how to choose a product bundle such that the utility is
maximized. Unlike Hicksian demand, this is uncompensated demand and its main focus is to maximize the utility
of the consumer. In fact, many times this is considered as the solution for UMP. Mathematically, it can be
expressed as
𝑥𝑖𝑚 (𝑝⃗, 𝐼) = 𝑎𝑟𝑔 max{𝑈(𝑥⃗)|𝑝⃗ ∙ 𝑥⃗ ≤ 𝐼}
𝑥⃗∈𝑋
where I is the income of the consumer, 𝑝⃗ and 𝑥⃗ are two vectors for price and quantity of consumption respectively
with utility function U(𝑥⃗) all belonging to topological vector space X where X = ℝ𝑛+ and Marshallian 𝑥𝑖𝑚 : ℝ𝑛+ →
ℝ. Looking into the derivation of this function, Lagrangian Multiplier form can be used to create a Lagrange
function utilizing the budget constraint as per equation 6.2, which gives the function Lm.
𝑛

𝐿𝑚 = 𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) + 𝜓 (𝐼 − ∑ 𝑝𝑖 𝑥𝑖 )
𝑖=1
where  is the Lagrangian multiplier. Observing the first-order conditions,
𝜕𝐿𝑚 𝜕𝑈
= − 𝜓𝑝𝑖 = 0
𝜕𝑥𝑖 𝜕𝑥𝑖
𝑛
𝜕𝐿𝑚
= 𝐼 − ∑ 𝑝𝑖 𝑥𝑖 = 0
𝜕𝜓
𝑖=1
𝜕𝑈
𝜕𝑥𝑖
This gives the value of to be . For two different products pi and pj, the expression for  is used and MRS is
𝑝𝑖
given by
𝜕𝑈
𝜕𝑥𝑖 𝑝𝑖
𝜕𝑈
=
𝑝𝑗
𝜕𝑥𝑗
𝜕𝑈
Here is the marginal utility for the j-th product. Different utility functions have different forms of Marshallian
𝜕𝑥𝑗
demand curves. However, homogeneity is observed at zero degrees. However, Marshallian demand is related to
Hicksian demand in the following way
ℎ(𝑝⃗, 𝑈(𝑝⃗, 𝑈0 )) = 𝑥 𝑚 (𝑝⃗, 𝑈0 )
where h is Hicksian demand, U is utility function and U0 is the minimum limit utility. This being the fundamental
demand function with Hicksian demand, brings to the end of the fundamental demand functions. Next the Slutsky
equation and demand function will be an introduction to the composite demand functions.

7.3 Slutsky Demand: Named after the Russian economist Eugen Slutsky, this demand helps in analyzing
the change in pattern of consumption of goods and services due to variation in the market. Mostly this variation
is due to change in prices. This decomposes the Marshallian demand into the Income effect and the Substitution
effect. The Income effect is the change in purchasing quantity due to the change in income of the consumer.
However, the Substitution effect deals with the change in relative prices of the products where income remains
constant and hence the consumption pattern of products again change. Based on these patterns, the Slutsky
equation is used which deals with the effects and Hicksian demand is checked. It is given by
𝜕𝑥𝑗 𝜕ℎ𝑗 𝜕𝑥𝑖
= − 𝑥𝑗
𝜕𝑝𝑗 𝜕𝑝𝑗 𝜕𝐼
Here, j-th product is considered whose Hicksian demand is given by hj, price is given by pj, consumption quantity
is xj and income is I. Income effect uses i-th product with consumption quantity xi. Looking into the terms of the
𝜕ℎ𝑗 𝜕𝑥𝑖 𝜕𝑥𝑗
equation, substitution effect is given by and income effect is given by 𝑥𝑗 and is the Slutsky effect. This
𝜕𝑝𝑗 𝜕𝐼 𝜕𝑝𝑗
helps in understanding the behavioral economics of consumers by decomposing the fundamental functions into a
detailed view and take an in-depth analysis in the requirements.

VIII. HB ALGORITHM: FINDING THE OPTIMAL FINITE SET


From the outputs of EmP and UMP, the outputs that are observed often contain a bigger set of bundles
which provide the maximum utility with the minimum price and satisfies Hicksian Demand for the same but in
real life scenario, such a comprehensive bundle may not be the required as a whole especially when the products

485
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

are alternatives of the same category of good/service. In such a case, we can further filter out the set to find an
optimal solution set which contains only the very specific and highly prioritized product alternatives. In non –
economic applications, such as some NP problems, shortest or least weighted path in Game Theory or even
optimization problems in any domain of Engineering, this plays a very crucial role. For a specific approach, Cobb
– Douglas is used for finding the utility in this case. Let there be n products numbered from 1 to n. The parameters
for the i-th product will be: xi for consumption, i for relative preference, pi for price of product, I for income and
UT for target limiting utility. Now the Cobb – Douglas function for this set will be
𝛼
𝑈(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = ∏𝑛𝑖=1 𝑥𝑖 𝑖 (8.1)
Using EmP, Lagrangian function for expenditure of this set, we get,
𝑛 𝑛
𝛼
𝐿𝑒 = ∑ 𝑝𝑖 𝑥𝑖 + 𝜔(𝑈𝑇 − ∏ 𝑥𝑖 𝑖 )
𝑖=1 𝑖=1
Where  is the Lagrangian multiplier. Checking the first order conditions for the j-th product
𝑛−1
𝜕𝐿 𝑒 𝛼𝑗 −1 𝛼
= 𝑝𝑗 − 𝜔𝛼𝑗 𝑥𝑗 (∏ 𝑥𝑖 𝑖 ) = 0
𝜕𝑥𝑗
𝑖=1
𝑛
𝜕𝐿 𝑒 𝛼
= 𝑈𝑇 − (∏ 𝑥𝑖 𝑖 ) = 0
𝜕𝜔
𝑖=1
which gives the value of multiplier to be
𝑝𝑗
𝜔= 𝛼𝑗 −1 𝛼𝑖
𝛼𝑗 𝑥𝑗 (∏𝑛−1
𝑖=1 𝑥𝑖 )
Also, the consumption quantity of the j-th product with respect to the first product, preferences of both and prices
of both is given by using MRS
𝑝1 𝑥1 𝛼𝑗
𝑥𝑗 = (8.2)
𝑝 𝑗 𝛼1
1
𝛼𝑗 𝛼 +1
𝑈𝑇 𝑝 𝑗 𝛼1 𝑗
However, using the value of x1 from equation 8.1, we get x1 to be ( 𝛼𝑖 ( ) ) . Using this to find xj
∏𝑛−1
𝑖=2 𝑥𝑖
𝑝1 𝛼𝑗
we get
𝛼𝑗 1
𝑝1 𝛼𝑗 𝛼𝑗+1 𝑈𝑇 𝛼𝑗 +1
𝑥𝑗 = ( ) ( 𝛼𝑖 ) (8.3)
𝑝 𝑗 𝛼1 ∏𝑛−1
𝑖=2 𝑥𝑖
Similarly, when UMP is used, the following Lagrangian function is created
𝑛 𝑛
𝛼
𝐿𝑈 = ∏ 𝑥𝑖 𝑖 + 𝜇(𝐼 − ∑ 𝑝𝑖 𝑥𝑖 )
𝑖=1 𝑖=1
where 𝜇 is the Lagrangian Multiplier. The first – order conditions for the j-th product give,
𝑛−1
𝜕𝐿𝑈 𝛼𝑗 −1 𝛼
= 𝛼𝑗 𝑥𝑗 ∏ 𝑥𝑖 𝑖 − 𝜇𝑝𝑗 = 0
𝜕𝑥𝑗
𝑖=1
𝑛
𝜕𝐿𝑈
= 𝐼 − ∑ 𝑝𝑖 𝑥𝑖 = 0
𝜕𝜇
𝑖=1
Now, in this condition we apply the duality of EmP and UMP and hence x i can be written in terms of x1 from 8.2
and write income from first – order conditions as
𝑛
𝑝1 𝛼𝑖
𝐼 = 𝑝1 𝑥1 + ∑ ( )𝑥
𝑝𝑖 𝛼1 1
𝑖=2
Hence, x1 and a general term xj can be derived using these terms as given in 8.4a and 8.4b. Equation 4b is declared
as the HB algorithm for quantity computation of the j-th product
𝐼
𝑥1 = 𝑛 𝑝1 𝛼𝑖 (8.4a)
𝑝1 +∑𝑖=2( )
𝑝𝑖 𝛼1
𝑝1 𝛼𝑗
𝐼( )
𝑝𝑗 𝛼1
𝑥𝑗 = 𝑝1 𝛼𝑖 (8.4b)
𝑝1 +∑𝑛
𝑖=2( )
𝑝𝑖 𝛼1
Equating the expressions of xj from 8.3 and 8.4b, we get the target utility to be
𝛼𝑗+1
𝐼 𝑝1 𝛼𝑗
𝑈𝑇 = ( ) ( )
𝑝1 + ∑𝑛𝑖=2 (
𝑝1 𝛼𝑖
) 𝛼1 𝑝𝑗
𝑝 𝑖 𝛼1

486
An Algorithm To Choose The Best Finite Bundle Of Products: Hb Algorithm

This equation is the HB equation or the HB algorithm for utility and gives the maximum utility that one can
𝑝1 𝛼𝑗
achieve when compared to the minimum expenses made. Here the term ( ) is the HB constant or the HB term
𝛼1 𝑝 𝑗
which gives the MRS for this function. To get the best bundle from this, equation 8.4b is the HB equation for
consumption quantity and using this for the set of n elements gives the set {𝑥1∗ , 𝑥2∗ , … , 𝑥𝑛∗ } which gives the
optimized set and this can be further filtered by Pareto Rule. Hence, sorting the set and filtering top 20% of the
consumption quantities in terms of utility gives the minimum cost involved and the highest combined utility.
Hence, the HB algorithm being the very first of its kind and a very helpful scenario when indifferent products are
existing in the preferences.

IX. CONCLUSION
Throughout the paper a thorough discussion on different forms of functions and tools in the Consumer
Theory have been discussed and finally a particular function for getting the desirable target utility which often
helps to decide when the market is not known. In other words, if the consumer is new in selecting the entities, but
has an idea on consumption quantities, then the HB utility algorithm can be used to find the target utility. However,
if the consumption quantity is unknown, the HB consumption equation (8.4b) can be used for computing the same.
This not only helps in Economics but also a crucial role in solving problems when a new material is chosen for a
particular work, a function to approach a problem, a pathway to ease the Search Algorithm and even an
optimization algorithm that can help in computing possible consumption of an unknown substance and the utility
that one can expect from it.

REFERENCES
[1]. Kapteyn, A. (1985). Utility and economics. De Economist, 133(1).
[2]. Wu, Q. (2023). Research on the factors that affect demand and the effects of changes in demand on prices. Advances in Economics,
Management and Political Sciences, 18, 391-395. [Link]
[3]. Rachlin, H., Green, L., Kagel, J. H., & Battalio, R. C. (1976). Economic demand theory and psychological studies of choice. In G. H.
Bower (Ed.), Psychology of learning and motivation (Vol. 10, pp. 129-154). Academic Press. [Link]
7421(08)60466-1.
[4]. Safiullin, L. N., Novenkova, A. Z., & Safiullin, N. Z. (2014). Utility and demand in the new economy. In International Conference
on Applied Economics (ICOAE) 2014.
[5]. Coto-Millán, P. (2003). 3 main forms of utility function. In Utility and production. Physica-Verlag Heidelberg.
[6]. Newman, P. (2017). Indirect utility function. In The New Palgrave Dictionary of Economics (2018 ed.). [Link]
1-349-95121-5_1245-2.
[7]. Sakai, Y. (1977). Elevated favorability, indirect utility, and direct utility. Journal of Economic Theory, 14(1), X13-129. Faculty of
Political Science and Economics, Hiroshima University, Hiroshima, Japan.
[8]. Roy, R. (1942) “De PUtilite, Contribution a la Theorie des Choix,” Hermann, Paris.
[9]. Wakker, P. P., & Yang, J. (2021). Concave/convex weighting and utility functions for risk: A new light on classical theorems.
Insurance: Mathematics and Economics, 100, 429–435. [Link]
[10]. Newman, P. (1987). Indirect Utility Function. In: The New Palgrave Dictionary of Economics. Palgrave Macmillan, London.
[Link]
[11]. Antonelli, G. (1886). ‘Sulla Teoria Matematica della Economia Politica’: Pisa. Translated as ‘On the Mathematical Theory of Political
Economy’, in J. L. Chipman et al. (eds.), Preferences Utility and Demand: A Minnesota Symposium. New York: Harcourt Brace
Jovanovich, 333–364.
[12]. Martínez-Legaz, J.-E., & Santos, M. S. (1996). On expenditure functions. Journal of Mathematical Economics, 25(2), 143-163.
[Link]
[13]. Divisia, F. (1928). L’indice monétaire et la théorie de la monnaie. Revue d’Économie Politique, 42, 980–1008.
[14]. Blackorby, C., & Diewert, W. E. (1979). Expenditure Functions, Local Duality, and Second Order Approximations. Econometrica,
47(3), 579–601. [Link]
[15]. Makun, K. (2024). An asymmetric analysis of public debt and defence expenditure in Fiji. Journal of the Knowledge Economy.
[Link]
[16]. Woo, C.-K. (1985). An application of the expenditure function in electricity pricing: Optimal residential time-of-use rate option. The
Energy Journal, 6(2), 89-100. [Link]
[17]. Walras, L. (1954). Elements of Pure Economics, or the Theory of Social Wealth (W. Jaffé, Trans.). George Allen and Unwin. (Original
work published 1874)
[18]. Darby, M. R. (1977). The consumer expenditure function. In Explorations in Economic Research, Volume 4, Number 5 (pp. 645-
674). National Bureau of Economic Research. [Link]
[19]. Bernal-Turnes, P., & Ernst, R. (2024). More bang for your buck: Best-practice recommendations for designing, implementing, and
evaluating job creation studies. Journal of the Knowledge Economy, 15(3), 1889–1912. [Link]
8.
[20]. Samuel, B. (2023). Microfinancing and microeconomics: Influence on individual lives. Economics & Management Information.
[Link]
[21]. Chibane, M., & Six, P. (2024). Dynamic asset allocation and consumption with the indirect utility function. Finance Research Letters,
65, 105542. [Link]
[22]. Patinkin, D. (1987). Walras' Law. The Hebrew University of Jerusalem and The World Institute for Development Economics
Research. To be published in The New Palgrave: A Dictionary of Economics. WIDER.
[23]. Samuelson, P. A. (1947). Foundations of Economic Analysis. Harvard University Press.
[24]. Mattei, A. (1971). A complete system of dynamic demand functions. *European Economic Review, 2*(3), 251-276.
[Link]
[25]. Slutsky, E. E. (1915). Sulla teoria del bilancio del consumatore. Giornale degli Economisti, 51, 1–26.

487

You might also like