Lectures on Laws of Supply and Demand,

Simple and Compound Interest and Logic

by Dr. Brendan Browne

Applications of the straight line equation

Demand and supply decisions by consumers, firms and governments determine the level of economic activity within an economy. As these decisions play a vital role in business and consumer activity, it is important to mathematically model and analyse them. This can be done by modelling the simple laws of economics, namely the demand and supply laws , by linear equations as a first approximate model.

There are several variables that influence the demand for a certain good or service .

These may be expressed by the general demand function

where

is the quantity demanded for good

is the price of good

is the income of the consumer

is the fashion or taste of the consumer

is other factors if there are any.

The simplest model is

where the price depends mainly on the quantity(or other factors remain fixed or negligible).This is called the law of demand in economics and the function

the demand function.

The demand function can be modelled by the general simple linear equation

where and .

A plot of with and is shown below.

Example The demand function is given by .

(a) Find the slope and intercepts of .(b) Plot for (c) What is the quantity demanded when(i) ? (ii) ?

(d) Find an expression for the demand function in the form .

Solution (a) slope=-0.5, intercepts 100 and 200 (b) Plot given below

(c) .

.

(d)



Supply Function The law of supply is a basic law in economics and is given by the

linear equation

where and and of course and are the price and quantity of a good .

A plot of where and is given below

Example

Example The supply function is given by .

Find(a) the slope and intercepts (b) plot for

(c) What is the price of the quantity

Solution (a) slope= +0.5 and intercepts vertical and horizontal (c)

Q=70.


Equilibrium in goods

Goods market equilibrium occurs when the quantity demanded by consumers and the quantity supplied by the producers of a good is equal. Equivalently, market equilibrium occurs when the price that a consumer is willing to pay is equal to the price that a producer is willing to accept . The equilibrium condition then is expressed as and .

In general this means that we have to solve two simultaneous linear equations

and .

Example The demand and supply functions for a good are given by

-----demand function

-----supply function

Calculate the equilibrium price and quantity graphically. Confirm your answer algebraically.

Solution

Graphical solution is given below.

Equilibrium point is approximately Q=89,P=55.

Algebraically

OR Subtracting

.


Lectures on Logic

Logic

Introduction Logic(word comes from the Greek word “logos” meaning word, speech or reason) is the mathematics of reasoning. The study of logic is the effort to determine the conditions under which one is justified in passing from given statements, called premises, to conclusions that is claimed to follow from them. Logical validity is a relationship between the premises and the conclusion such that if the premises are true then the conclusion is true.

Logic is fundamental important in information technology for the following reasons.

(i)Logic is used in writing computer code.

(ii)Logic particularly predicate logic is used in declarative languages such as

Prolog(stands for PROgramming in LOGic) for querying databases.

(iii)Formal specification documents are written in specification languages such as

Z which relies heavily on logic.

.

(iv)Proof of Correctness of programs uses techniques of logic to prove that if the

input variables satisfy certain specified predicates or properties, the output variables

produced by executing the program satisfy certain properties.

(v)Laws of logic are used in the design of the digital circuitry in the digital computer.

(vi)logic is the theoretical basis of relational data base theory and artificial intelligence.

Definition: Logic is the mathematics of reasoning. Logic in general comprises Propositional Logic (that is logic, involving only propositions and logical connectives) and Predicate Logic(that is logic involving predicates and quantifiers). One of the main objectives of logic is to analyse and test the validity or otherwise of an argument. In general you need both types of logic to analyse the most complicated arguments. First we will study Propositional Logic.

Propositional Logic

Propositional logic is logic that consists only of propositions and not predicates.

To analyse an argument you must break the argument into its constituent ( smallest parts)

parts or atomic parts which are called propositions. These propositions are represented in logic by capital letters usually from the start of the alphabet, such as or .More complicated propositions are represented by compound proposition which are composed of two or more propositions connected by logical connectives. The main logical connectives are, and(), or (),not() ,conditional implication() and biconditional implication (or ).

Propositions are to logic as numbers are to arithmetic. We define a proposition and the different logical connectives using truth tables which are the building blocks of logic.

Formal logic can represent the statements we use in English to communicate facts or information. This it does, as we said, by using letters and to represent simple statements or propositions and special symbols for logical connectives.

Definition: A proposition or statement is a simple statement that is either true(T) or false(F). Whichever of these (T or F) is the case is called the true value of the proposition.

Note Thus a proposition can have only two truth values either T or F.

Example 1 Consider the following statements. Are they propositions or not?

(i)  Twenty is less than thirty. (ii)How are you?

(iii) Come here. (iv) She is very talented.

(v) There are life forms on other planets.

Solution

(i) Is a proposition since it has a truth value namely F

(ii) Is a not proposition since it has no truth value—It is a question.

(iii) Is a not proposition since it has no truth value—It is a command.

(iv) Is a not proposition since it has no truth value—It is not well-defined

since she is not specified enough.

(v)It is a proposition since it has truth value T or F—We do not have to be able to

decide which for it to be a proposition.

Exercise 1

Which of the following are statements or propositions. Explain?

(a)The moon is made of green cheese. (b) He is certainly a tall man.

(c) Two is a prime number. (d)Will the game be soon over?

(e) Next year interest rates will rise. (f) Next year interest rates will fall.

(g) Give me your book.

(h)My laptop computer works. (i)Set up my computer.

(j)All my computer files are binary files.

Exercise 2 Determine whether each of the following sentences is a proposition.

(i)In 1998 William Clinton was president of the United States.

(ii)Compile my computer program.

(iii)What time is it?

(iv)Fifteen is an even number.

Explain.

Exercise 3 If stands for the proposition “The specification is suitable” and

stands for “The programming team is happy” write out in English

the meaning of the following symbolic statements.

(i) , (ii) .

Note .


Consider the following statement “ This statement is false.”

This is an example of a self-referential statement(i. e. it makes a statement about itself)

Let us investigate its truth value. Assume it is true. Then the statement is false as it tells us it is false. If we assume it is false then because the sentence is telling us it is false then the sentence is true. This sentence is an example of a paradox and the only way to avoid the difficulty is simply not to allow it as a proposition in logic. Thus in our logic we will not allow self-referential statements.(This does not mean that there is no place for self-reference in logic. In fact some of the most important results in modern logic involve self-referential propositions)

What about statements such as “ Ice cream is delicious. ” We will not consider this a proposition because it is clearly a matter of choice or opinion. The reason for excluding

such statements as propositions is that in logic, mathematics and computer science statements are very precisely defined and there is no doubt when a statement is a proposition or not.

Connectives and Truth Tables

In English simple statements are combined with connecting words like and to make more interesting compound statements. The truth value of the compound proposition depends on the truth values of its separate propositions and the connectives. The most commonly used connectives and their logic symbols are given below.

Logic Connective Symbol

and

or(inclusive)

not or

if then (conditional implication)

if and only(iff) or (bicondional implication)

Definition A compound proposition is two or more propositions combined by a

logical connective.

Example 2 “ If Brian and Angela are not both happy then either Brian is not happy or

Angela is not happy”.

This is an example of a compound proposition. Logic is not concerned with determining the truth values of simple propositions( that depends on facts outside of logic) but in determining the truth value of compound propositions because of its logical structure.

In the case above we will analyze it and show it is always true due to its structure.(You can see this for this simple example just by thinking about it.)In fact it is what is called in logic a tautology.

We will let letters or represent single propositions and we will now investigate the truth values of some simple compound propositions with the most widely used logical connectives. This we do by defining truth tables for the different connectives and these tables are extremely important as they are basic tools of logic and must be remembered off by heart.

Logical Connective and denoted .

The expression is called the conjunction of and . and are called the conjucts of this compound proposition.

Its truth table is

T / T / T
T / F / F
F / T / F
F / F / F

Explanation

Let: Dublin is in Ireland.

10 is greater than 7.

is true.

is false.

is false

is false.

All obvious and no controversy.


Logical Connective—The Inclusive or denoted by

The compound proposition is called the disjunctioin of and . and

are called the disjuncts of the compound propositions.

The truth table for is

T / T / T
T / F / T
F / T / T
F / F / F

Explanation

Let: Dublin is in Ireland.

10 is greater than 7.

is true.

is true.

is true

is false.

All obvious and no controversy.

Note The word or is used in English in two different ways.

Example 3 If a discount is available to anyone who is a student or pensioner it is presumably available to someone who is both a student and a pensioner. This is the use of the inclusive or () that in a compound proposition is true if both propositions are true.

There is another use of or in English called the exclusive or ( sometimes called XOR and denoted by ).

Example 4 On a menu in a restaurant we have “Soup or Salad comes as a starter”.

Restaurants almost always mean that the customers can take Soup or()

Salad but not both. This is an example of the exclusive or rather than the

inclusive or. Hence when both propositions are true in a compound

proposition with the exclusive or the compound proposition is false.

The truth table for is

T / T / F
T / F / T
F / T / T
F / F / F

Explanation

All obvious except row 1 which is explained by restaurant menu above.

N.B. In logic we always use the inclusive or ( ) ,never the exclusive or ( ).

However the exclusive or ( ) is used in computer science particularly in

Cryptography and Network Security—see Cryptography and Network Security by

W.Stallings—Prentice-Hall 1999, ISBN-0-13-869017-0.

Logical Connective --Conditional Implication denoted by has the following

truth table.

T / T / T
T / F / F
F / T / T
F / F / T

Explanation

Let: You pass your summer examinations.

I will take you out for a drink.

I make the statement

If You pass your summer examinations then I will take you out for a drink.

In symbolic logic .

(i)If you pass your summer examination and I take you out for a drink—then you

would agree that I did not tell a lie. is true.—first row of truth table—

obvious.

(ii)If you pass your summer examination and I do not take you out for a drink—then

you would agree that I did tell a lie. is false.— second row of truth

table— obvious.

(iii)If you do not pass your summer examination and I do take you out for a drink—

then you would agree that I did not tell a lie. is true.— third row of

truth table— not so obvious.