Homework-1
Problem-1:
Produce a simple formula for ∑_(i=a)^n▒〖i 〗 where a, n € Z and 1 ≤a≤n.
ANS:
Given Equation we have to find out the summation of natural numbers starting from ‘a’ to ‘n’.
Which can be written as below, (1) ∑_(i=a)^n▒〖i 〗 = (∑_(i=1)^n▒〖i 〗) – (∑_(i=1)^(a-1)▒〖i 〗)
As we generally know the equation for sum of ‘N’ natural numbers is (2) ∑_(i=1)^n▒〖i 〗 = n(n+1)/2
From above equations we can able to apply formula -2 in
…show more content…
We have to show, C1.g(n)≤f(n) ≤C2.g(n) for all n≥n0 C1(n2) ≤ n ≤ C2(n2) for all n≥n0 ….(1) To satisfy this inequality (1) simultaneously, we have to find the value of C1,C2 and ,n0 using the following inequality C1(n2) ≤ n ………(2) n ≤ C2(n2) ………(3)
Inequality (2) is not satisfied for any values of C1,n0 for n≥n0
Inequality (3) is satisfied for a value of C2=1 and n0=1.
So both inequalities (2) and (3) are not satisfied simul-taneously, So it is clear that f(n) ≠ Θ(g(n)).Which clearly implies that, =>f(n) ∈ Θ(g(n)) is Incorrect. =>f(n) Θ(g(n))
∑_( i=1)^( n)▒i0 Θ(n2).
Problem-5:
Write pseudo-code for each of the following two algorithms to raise an integer to an integer power. In both cases, assume n = 2m. Analyze the run-time complexity of each algorithm in therms of the number of multiplications performed (determine _(n)).
(a) Na¨ıve: xn = x × xn−1 x0 = 1
(b) Repeated Squaring:
xn = (xn/2)2 x0 = 1
ANS:
Here firstly generating pseudo code for both algorithms,
…show more content…
Thus total number of operations needed to execute the function for any given n, can be expressed as sum of 2 operations and the total number of operations needed to execute the function for n-1. Also when n=1, it just needs one operation to execute the function
In other words T(n) can be expressed as sum of T(n-1) and two operations using the following recurrence relation:
T(n) = T(n – 1 ) + 2
T(1) = 1
We need to solve this to express T(n) in terms of n. The solution to the recurrence relation proceeds as follows. Given the relation
T(n) = T(n – 1 ) + 2 ..(1)
we try to reduce the right hand side till we get to T(1) , whose solution is known to us. We do this in steps. First of all we note (1) will hold for any value of n. Let us rewrite (1) by replacing n by n-1 on both sides to yield
T(n – 1 ) = T(n – 2 ) + 2 …(2)
Substituting for T(n – 1 ) from relation (2) in relation (1)
Input : ( 3 x 412 ) + ( 463 ) + ( 360 ) + ( 496 x 1.5 ) = 2803
where n is the number of half-lives that elapsed, T is the amount of time the radioisotope has decayed and (t)1/2 is the half-life of the nuclei, this is to determine the half-life of the radioisotope.
E.g. 5! = 5 x 4 x 3 x 2 x 1 5! = 120.
Step-Stair Investigation For my GCSE Maths coursework I was asked to investigate the relationship between the stair total and the position of the stair shape on the grid. Secondly I was asked to investigate the relationship further between the stair totals and the other step stairs on other number grids. The number grid below has two examples of 3-step stairs. I will use Algebra as a way to find the relationship between the stair total and the position of the stair on the grid.
...ter may use several words that can be grouped together into one word. An example of this would be :
Stiff, L. V. (2001, April). Making calculator use add up. NCTM News Bulletin. Retrieved from http://www.nctm.org/about/content.aspx?id=1242
3 + 5 + 4 + 4 + 5 + 3 + 4 + 5 + 4 + 4 + 5 + 4 + 5 + 5 + 4 + 4 + 4 + 2
Digits, add a previous carry and place the product to the left of the previous step's answer.
T-total = (Tn - 9) + (Tn - 17) + (Tn - 18) + (Tn -19) + Tn
Processing time, which is sum of all cycle times, and lead time, which is sum of all processing time and queues times, are calculated. The maximum value added percentage is calculated as
Therefore, a number like 356 has a 3 in the hundreds place, a 5 in the tens place, and a 6 in the ones place. The digit 3, in the hundreds place, does not represent 3 as it represents 300. This idea is generally introduced in the lower elementary grades in order to help students manipulate numbers and solve problems. If a child understands that number 356 is actually 300+50+6, the student can play around with this number more easily. Understanding this concept might make it easier to add or subtract numbers, as well as use multiplication in the future grades – 365 x 3 = (300 x 3) + (50 x 3) + (6 x 3). The concept that numbers can be broken apart and put back together gives the student a more solid understanding of how different operations work. Not only that, but the student can also figure out how to solve problems independently by playing with the numbers (Rumack,
1; :::; n. The denition of Vn(y) is the value obtained at the last time n, in state
Then, to work out the total no. I added up all the numbers in the
Step 4: Presently we have 1. Now we cannot divide 2 by 3, so take second term
Fibonacci sequences are set of numbers based on the rule that each number is equal to the sum of the preceding two numbers; it can be also evaluated by the general formula where F(n) represents the n-th Fibonacci number (n is called an index), the sum of values in pascal`s triangle diagonal also demonstrates Fibonacci sequences. The presentation and report are designed to discover the application of Fibonacci sequences in daily life. The famous Fibonacci sequence has captivated mathematicians, artists, designers, and scientists for centuries therefore it is suggested as an important fundamental characteristic in real life.