lec 2 What is computation
lec 2 What is computation
Prof Sane
● Fork →
○ computational (computation based), (Indian)
○ axiomatic (proof based) (Greek tradition)
● Algorithm → Al Khwarizmi -> “Compendious Books of Hindu Calculational
Methods” (800 ce)
○ The use of decimal numbers, mult, add, div etc…
○ Kh. never understood negative numbers
○ al gorismi → algorithm
● Axiomatic: popular, and a lot intellectual work went into it
● “al jabbar” → algebra, “balancing” no symbols whatsoever (symbolic 1650ce,
Vieta)
● Schools → axiomatics is mathematics
● Equation solving has pride of place in school.
Prof Sane
● Equations are necessary for describing problems, but it is impossible to solve
equations more complicated that quartics (4th power)
● Differential equations become more unsolveable even more quickly
● You end up inventing algorithms for both of the above
● Newtons eq “worked” → predictions were correct
○ Neptune (1880??) (prediction and observation disagreed)
■ Waman Tilak -- he got it better and more correct than
■ Solution: there is an unknown planet that is perturbing neptune → Pluto
○ Our theory is correct, but our experimental setup has limitations
● Failed again around 1930, this time for Mercury
○ Unknown planet called Vulcan → but nobody could find it
○ This time though Mercury motion was explained by a better theory, Relativity
Prob 1
● Sum of numbers from 1.. n is n*(n+1)/2
Induction : non inductive proofs
1 + 2 + 3.. + n
n + (n-1) + .. 1
--------------------
n*(n+1)
● There is a non-uniform infinite ladder, prove that I can climb to any height
desired.
● Non uniform means: The distance between steps can vary
● If the following 2 conditions hold
○ I can climb to the first step from the ground
○ If I am at ANY Kth step, I can always climb to the K+1th step
● Then
○ I can climb to any height desired
● Another way of saying: no step is further apart than my ability to climb
Formal notion of induction
I have to prove a proposition Q involving a property P(x)
Q --> FOR ALL n, n is non-negative integer, P(n) is true
P(n) --> induction hypothesis
Steps
1. For n == 0, P(0) is true
2. Choose any arbitrary non-neg integer k (I don’t know what it is, so I rep with a
symbol)
a. ASSUME that the property P(k) is True (it is true at integer k)
b. PROVE that GIVEN P(k) I can prove P(k+1)
Gofer version of induction
Gofer version of induction upto whichever n is given. Start with a list of integers.
ints.n = [1...n]
and : [Bool] -> Bool -- “and” is True if all elements of input list are true “myand.True.True = True”
--- Sigma(i = 0 to n) =? n (n + 1) 2
-- Q --> FOR ALL n, n is non-negative integer, P(n) is true ( generalized for any predicate / proposition “p”) (countable)
--Principle of Induction “Schema” -- schema is a technical name when you want to say statements about “Any Proposition”
● Suppose you have written a program Z that looks at a list of numbers and tells
you whether property P is true, where P is “for every pair of numbers, the
smaller appears before the larger in a list”
● You already know what the property is.
● If the program is k-th way through (it has examined k numbers), and then it
will successfully verify the k, k+1th pair has property P,
● Then that program Z will work for any list of numbers.
Python
B - COPY 1 3
COPY 2 1
COPY 3 2
END
i_(k) = 1
i_(k+1) = i_(k) + 2
i_(k+2) = i_(k+1) +
Samichi
● Sum of numbers from 1.. n is n*(n+1)/2
● N = 1 ; 1*(1+1)/2
● 1*2/2
● 1 ; hence proved
● 1+ 2 + … + n + (n+1) = n*(n+1)/2 + (n+1)
● (2n + 2 + n^2 + n)/2
● (n+1)(n+2)/2
Shatakshi barde
Pratik Patil
● Sum of numbers from 1.. n is n*(n+1)/2
Let us considering P(n) = 1 + 2 + 3 + ….. + n = n(n +1)/2
For the n = 1
LHS of P (n) = 1
Therefore, LHS = RHS Here, P (n) is true for n = 1 Let us consider P (n) be the true for n = k, therefore 1 + 2 + 3 + …. + k =
k (k+1)/2 … (i)
Then, (1 + 2 + 3 + … + k) + (k + 1) = k(k + 1)/2 + (k + 1) = (k + 1) (k/2 + 1) = [(k + 1) (k + 2)]/2 = [(k + 1) [(k + 1) + 1]]/2 P (n)
is true for n = k + 1 P (n) is true for all n ∈ N
Therefore, by the principle of Mathematical Induction Thus, P (n) = 1 + 2 + 3 + ….. + n = n (n +1)/2 is true for all n ∈ N.
Nidhi
To prove : Sum of numbers from 1.. n is n*(n+1)/2
hence n = 1 is true
summation n = [n (n+1)] / 2
lhs ⇒ sum up to 1 is 1
rhs ⇒ [1*2] / 2
rhs ⇒ 1
lhs ⇒ [n^2 + n + 2n +2 ] /2
rhs ⇒ [n^2 + 3n + 2 ]
hence lhs=rhs
Solving 1 and 2
1+2+3+...n = n(n+1/2)
Kinjalkini Gautam
1. Yes, the sum of numbers from 1 to 1 is n*(n+1)/2 = 1
a. Since 1(1+1)/2 = 1
b. Therefore proved for first member of set
2. Assume that the sum of numbers from 1 to n is n*(n+1)/2
3. From this it follows that the sum of numbers from 1 to (n+1), is (n+1)(n+2)/2
4. Therefore the proposition is true for the first member of the set and if it is true
for a number of the set, it is true for the next number.
5. This means that the proposition is true for all numbers.
Rishikarthik Velliangiri
- Sum of numbers from 1.. n is Pattern:
n*(n+1)/2 When n increase by one, the answer increases by n compared to the
previous answer
n=1
1*(1+1)/2 = 1
Ex: n = 2, ans: 3
n=2 n = 3, ans: 6
2*(2+1)/2 = 3 = 2 + 1 3+n
n=3 3+3=6
3*(3+1)/2 = 6 = 3 + 2 + 1 Previous answer of 3 increase by 3 when n=3 and became 6. This means
the new integer was added to the sum of all integers upto n.
n=4
Which Means: 1+2+3+4+…+n = n*(n+1)/2
4*(4+1)/2 = 10 = 4 + 3 + 2 + 1
1+2…+5+k = 5*(5+1)/2 + k =
Ayesha Rao
● Sum of numbers from 1.. n is n*(n+1)/2
Let n = 1
1 = 1(1+1)/2
If the same is repeated for more numbers further. For 2, 3, 4, and so on. When the
same result of LHS = RHS holds true, then we can say P(n) it is true by principle
of mathematical induction.
Kaavya Rajasekar
Let P(n): 1+2...+n = n* (n+1)/ 2
For n=1,
1*(1+1)/2 = 1
LHS=RHS
LHS = 1
RHS = n*(n+1)/2
= 1*(1+1)/2
=1
Neel Patel
n*(n+1)/2
Lhs = 1
Rhs = n*(n+1)/2
= 1*(1+1)/2
=1
Aadhya Dechamma