Discrete Math Logic Defineing a function recursion-ish

In summary: A(k+1-1, A(k+1, 2-1))= A(k, 2)= 4 by assumptionTherefore, A(k+1,2) = 4, which completes the induction step. For c, you would do something similar, assuming that A(1,n) = 2^n for some n>=1 and then proving that A(1,n+1) = 2^(n+1).
  • #1
geforce
26
0
(3) De fine a function A(m,n) as follows.
A(0,n) = 2n for every n.
A(m,0) = 0 for every m >= 1
A(m,n) = 2 if m >= 1 and n = 1
A(m,n) = A(m -1,A(m, n - 1)) otherwise (i.e., if m >= 1 and n >= 2.

(b) Prove A(m,2) = 4 for every m >= 2
(c) Prove A(1, n) = 2^n for every n >= 1.

Proving these by induction

B) Base Case

M>=2

M=2

A(2,2) = A(2-1, A(2, 2-1))

A(2,1) = 2 by rule so

A(2,2) = A(1, 2) = A(1-1, A(1, 2-1))

A(1,1) = 2

So A(1,2) = A(0,2)
A(0,2) = 2n = 2(2) = 4
Finally, A(2,2) = 4

Induction step

K+1 = 3

M>=3

A(3,2) = A(3-1, A(3, 2-1))

A(3,1) = 2

A(2,2) = 4 from before
so A(3,2) = 4

C) Is basically the same solving

My question is for B) C) Should i be using variables like i, j or something like that because i think I'm doing something wrong with proving because it looks a bit too simple.
 
Physics news on Phys.org
  • #2
have you studied induction ? you have proved the base case. that's fine. now for the induction
case you assume that the statement is true for some [itex]k\geqslant 2[/itex] and then prove that the statement is true for [itex]k+1[/itex]. So for b, assume that

[tex]A(k,2) = 4[/tex]

for some [itex]k\geqslant 2[/itex]. Now prove that the statement is true for [itex]k+1[/itex].

[tex]A(k+1,2) = 4[/tex]
 

1. What is discrete math logic?

Discrete math logic refers to the branch of mathematics that deals with discrete structures and objects, such as integers, graphs, and logical statements. It is used to analyze and solve problems in computer science, engineering, and other fields.

2. What is a function in discrete math logic?

In discrete math logic, a function is a relation that maps each element from one set to exactly one element in another set. It is a fundamental concept used to model relationships between objects in mathematical structures.

3. How is recursion used in discrete math logic?

Recursion is a technique commonly used in discrete math logic to define functions or algorithms in terms of themselves. It involves breaking down a problem into smaller subproblems and solving them recursively until a base case is reached.

4. What is the difference between a recursive and iterative function?

A recursive function is defined in terms of itself, while an iterative function is defined in terms of a loop or repeated process. Both approaches can be used to solve problems, but recursion is often preferred in discrete math logic for its simplicity and elegance.

5. How is discrete math logic used in computer science?

Discrete math logic is an essential tool for computer scientists as it provides the foundation for many important concepts and techniques, such as algorithms, data structures, and programming languages. It is used to analyze the efficiency and correctness of algorithms and to design and implement efficient solutions to various problems in computer science.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
276
  • Calculus and Beyond Homework Help
Replies
1
Views
504
  • Calculus and Beyond Homework Help
Replies
7
Views
411
  • Calculus and Beyond Homework Help
Replies
1
Views
514
  • Calculus and Beyond Homework Help
Replies
4
Views
308
  • Calculus and Beyond Homework Help
Replies
1
Views
257
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
759
  • Calculus and Beyond Homework Help
Replies
3
Views
813
  • Calculus and Beyond Homework Help
Replies
1
Views
576
Back
Top