Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

bbkzr31 Group Title

Need help with a discrete math problem.

  • 10 months ago
  • 10 months ago

  • This Question is Closed
  1. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    • 10 months ago
  2. zimmah Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm not familiar with these type of problems, seems like you need to use the bottom formul a for both, but I don't know how to fill it in.

    • 10 months ago
  3. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So if I started filling in the bottom formula for A(3, 3) A(3-1, A(3,3-1)) A(2, A(3,2)) Plug the A(3,2) back into the formula: A(2, A(3-1, A(3, 2-1))) A(2, A(2, A(3, 1))) Now n = 1 so I can use the third formula to get A(3, 1) = 2 A(2, A(2, 2)) A(2, A(2-1, A(2, 2-1))) A(2, A(1, A(2, 1))) Use the third formula again: A(2, A(1, 2)) A(2, A(1-1,A(1, 2-1))) A(2, A(0, A(1, 1))) A(2, A(0, 2)) Use the first formula: A(2, 2n) A(2, 2(2) A(2, 4) A(1, A(2, 3)) A(1, A(1, A(2, 2))) A(1, A(1, A(1,A(2, 1)))) A(1, A(1, A(1, 2))) A(1, A(1, A(0, A(1, 1)))) A(1, A(1, A(0, 2))) A(1, A(1, 2(2))) A(1, A(1, 4)) A(1, A(0, A(1, 3))) A(1, A(0, A(0, A(1, 2)))) A(1, A(0, A(0, A(0, A(1, 1))))) A(1, A(0, A(0, A(0, 2)))) A(1, A(0, A(0, 4))) A(1, A(0, 8)) A(1, 16) A(0, A(1, 15)) A(0, A(0, A(1, 14)) lol, this is going to take a while.

    • 10 months ago
  4. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Anyone know if this is how you do it, or is there a faster way?

    • 10 months ago
  5. amscasey Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Sorry, this is WAY above my level of math :/ wish i could be more help

    • 10 months ago
  6. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @amistre64 Do you know if I am doing this right?

    • 10 months ago
  7. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    it looks like a recurrsion alright

    • 10 months ago
  8. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, that is what it is.

    • 10 months ago
  9. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    A( m-1, A(m,n-1) ) ; 3,3 A(m,n) = A( 3-1, A(3,3-1) ) A(3,3) =A( 2, A(3,2) ) A(3,2) = A( 2, A(3,1) ) A(3,1) = 2 A(3,2) = A( 2, 2) = A( 1, A(2,1) ) A(3,2) = A( 0, 2 ) = 4 A(3,3) =A( 2, 4 ) etc ....

    • 10 months ago
  10. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    multivariables seem to be a pain to do by hand, might help to program a simple loop for it

    • 10 months ago
  11. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Well I have to show my work for the homework so I'll probably have to write it out. I guess it is basically just a lot of plugging in the numbers over and over again.

    • 10 months ago
  12. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Makes sense though, the way this one is going, I bet the A(3,4) will be really long, haha.

    • 10 months ago
  13. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    if you can determine a pattern :) but ive never really tried for a multivariable

    • 10 months ago
  14. zimmah Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Oh that makes sense. It's like programming an if-then-else loop

    • 10 months ago
  15. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    yep

    • 10 months ago
  16. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Well I guess I could do a simple program that outputs each step and then just copy the results to the paper.

    • 10 months ago
  17. zimmah Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Having never seen anything like this I was like put what in what now? Lol

    • 10 months ago
  18. zimmah Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Ye, that would be faster I guess

    • 10 months ago
  19. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Alrighty thanks for the help guys! I'm gonna hit up some python :D

    • 10 months ago
  20. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Well I started on the program. I think it will take a little more work to get it to print all the steps. def A(m, n): print "(", m, ", " , n, ")" if m == 0: return (2*n) elif m >= 1 and n == 0: return 0 elif m >= 1 and n == 1: return 2 elif m >= 1 and n >= 2: return (m - 1, A(m, n - 1)) m = input('m: ') n = input('n: ') answer = A(m,n)

    • 10 months ago
  21. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    And, I don't think it is working quite right yet.

    • 10 months ago
  22. amistre64 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    yeah, i was trying to do it in excel ... its tricky at best

    • 10 months ago
  23. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    oops, missed an A in the return

    • 10 months ago
  24. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Here is my output: ( 3 , 3 ) ( 3 , 2 ) ( 3 , 1 ) ( 2 , 2 ) ( 2 , 1 ) ( 1 , 2 ) ( 1 , 1 ) ( 0 , 2 ) ( 2 , 4 ) ( 2 , 3 ) ( 2 , 2 ) ( 2 , 1 ) ( 1 , 2 ) ( 1 , 1 ) ( 0 , 2 ) ( 1 , 4 ) ( 1 , 3 ) ( 1 , 2 ) ( 1 , 1 ) ( 0 , 2 ) ( 0 , 4 ) ( 0 , 8 ) ( 1 , 16 ) ( 1 , 15 ) ( 1 , 14 ) ( 1 , 13 ) ( 1 , 12 ) ( 1 , 11 ) ( 1 , 10 ) ( 1 , 9 ) ( 1 , 8 ) ( 1 , 7 ) ( 1 , 6 ) ( 1 , 5 ) ( 1 , 4 ) ( 1 , 3 ) ( 1 , 2 ) ( 1 , 1 ) ( 0 , 2 ) ( 0 , 4 ) ( 0 , 8 ) ( 0 , 16 ) ( 0 , 32 ) ( 0 , 64 ) ( 0 , 128 ) ( 0 , 256 ) ( 0 , 512 ) ( 0 , 1024 ) ( 0 , 2048 ) ( 0 , 4096 ) ( 0 , 8192 ) ( 0 , 16384 ) ( 0 , 32768 )

    • 10 months ago
  25. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    lol

    • 10 months ago
  26. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I think one of the hardest parts will be getting it to output the results correctly

    • 10 months ago
  27. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Any luck with excel? I'm gonna switch to C++ to try to get the output working right.

    • 10 months ago
  28. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So here is what I came up with. Ended up using C. #include <stdio.h> #include <stdlib.h> int m; int n; int answer; void PrintA(m,n) { printf("A(%d, %d) = ", m, n); printf("A(%d, A(%d, %d)\n", m-1, m , n-1); } int A(int m, int n) { if(m == 0) return (2*n); else if(m >= 1 && n == 0) return 0; else if(m >= 1 && n == 1) return 2; else if(m >= 1 && n >= 2) PrintA(m,n); return A(m - 1, A(m, n - 1)); } int main() { printf("m: "); scanf("%d", &m); printf("n: "); scanf("%d", &n); answer = A(m, n); printf("Answer: %d\n", answer); return 0; }

    • 10 months ago
  29. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Here is what I get for the first one. A(3,3) Obviously the answer is wrong, but all the steps up to the answer should be correct. So I can calculate the answer myself from the last step, which is 4 I think.

    • 10 months ago
    1 Attachment
  30. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    That works fine, now the problem is when I try A(3, 4) although I get the answer to be 0, it outputs for about 30 seconds, so I get like 1000s of lines of output which would be a bit too much to write. lol. Anyway, I'm thinking there must be some way to recognize a pattern in order to get the answer. :/

    • 10 months ago
  31. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    So yeah I found a pattern for A(3,3) problem when I got to A(1,16) and got the computer output you got.

    • 10 months ago
  32. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    which i will most likely leave as 2^16

    • 10 months ago
  33. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So the stops working?

    • 10 months ago
  34. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I seen 2^n*A(1,16-n)

    • 10 months ago
  35. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    what do you mean stops working?

    • 10 months ago
  36. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So how would I use this pattern in finding a solution? mistyped, you said you found a problem earlier.

    • 10 months ago
  37. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    pattern not a problem i was referring to your problem/question

    • 10 months ago
  38. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    oh I get it now, lol.

    • 10 months ago
  39. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    wow yeah it looks like A(3,4) might take longer to find.

    • 10 months ago
  40. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Ah right, so we would need a separate pattern for A(3,4) determined by some of the output?

    • 10 months ago
  41. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    You said you got 0. That is what I got too.

    • 10 months ago
  42. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    A(3,4) =A(2,A(3,3)) =A(2,2^16) =A(1,A(2,2^16-1)) ------------------ Let's look at A(2,2^16-1) A(2,2^16-1)=A(1,A(2,2^16-2)) There is like a pattern going on we have A(2,2^16-b) b keeps increasing eventually it will get to 2^16 Since this is happening in the n part of A then the output will be 0.

    • 10 months ago
  43. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Is this what you were looking for?

    • 10 months ago
  44. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes I think so, just trying to get my head around it. I think once I look at it for a bit I will understand.

    • 10 months ago
  45. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks so much for all the help though! Really appreciate it.

    • 10 months ago
  46. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Like A(something bigger than 1,0)=0 eventually A(1,k) will be A(1,0)

    • 10 months ago
  47. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    And A(1,0)=0

    • 10 months ago
  48. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    so b will eventually get to 2^16?

    • 10 months ago
  49. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    yep.

    • 10 months ago
  50. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    and then it will be 0. I get it now, thank you so much :D

    • 10 months ago
  51. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Like because we keep subtracting 1 each time.

    • 10 months ago
  52. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I'm not doing all those steps. It is impossible to do all those steps. You have to look for a pattern.

    • 10 months ago
  53. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    n=2^16 n-1=2^16-1 (n-1)-1=n-2=2^16-2 (n-2)-1=n-3=2^16-3 ....

    • 10 months ago
  54. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    we keep subtracting 1 from the n before.

    • 10 months ago
  55. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    right right, exactly, until n becomes 0, then according to the second formula A(3,4) == 0

    • 10 months ago
  56. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @myininaya Hi there, could you look over this one more time. According to my teacher, it is impossible to find the second number for A(3,4) by using a computer algorithm. And the students in my class are saying the answer is a really big number and not 0. Like a lot bigger then the number for A(3,3) Do you have any idea where that would be coming from?

    • 10 months ago
  57. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Well it looked like the pattern was going toward it being 0. I can look at it again. Did you explain your thinking to the teacher person? Like why did they say the thinking was wrong?

    • 10 months ago
  58. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    The teacher hasn't looked at my work yet, he was just giving hints to help with the homework, and he said that this part cannot be done with a computer program because it will run out of memory and lose the answer.

    • 10 months ago
  59. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't really understand why that would happen, but I just want to make sure to get it right since other students are getting really large numbers.

    • 10 months ago
  60. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    He didn't say a human couldn't do it though right?

    • 10 months ago
  61. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    No, he said it was possible to do by hand, but not with an algorithm.

    • 10 months ago
  62. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Just because a computer doesn't have the space to use an algorithm to compute doesn't mean we don't have the space.

    • 10 months ago
  63. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    So the answer is still 0

    • 10 months ago
  64. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    n=2^16 n-1=2^16-1 (n-1)-1=n-2=2^16-2 (n-2)-1=n-3=2^16-3 remember when I wrote this?

    • 10 months ago
  65. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    2^16 steps is a lot. I don't know if it is too long for a computer or not. But it will actually take longer than 2^16 steps to compute.

    • 10 months ago
  66. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Right, so there isn't some sort of pattern we could figure out to get the answer without the steps?

    • 10 months ago
  67. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I said it would take longer than 2^16 because we did some other crap before to get there and we still have to do more stuff after that, but the pattern seems to be leading to the answer being zero.

    • 10 months ago
  68. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Hmm, well I'll stick with that then. Perhaps my teacher is wrong. :D

    • 10 months ago
  69. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    What? You said your teacher said it was possible for a human I thought.

    • 10 months ago
  70. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    "No, he said it was possible to do by hand, but not with an algorithm."

    • 10 months ago
  71. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, but I got 0 with the program I wrote.

    • 10 months ago
  72. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    So the answer you are saying is not zero?

    • 10 months ago
  73. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Which is just a simple recursive function.

    • 10 months ago
  74. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    That is what I was led to believe by my fellow students and teacher.

    • 10 months ago
  75. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    So the teacher said the answer isn't 0 and does exist.

    • 10 months ago
  76. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    No, the teacher didn't say anything about the answer, just that it couldn't be done with a computer, and since I got the same number with I computer 0, as you got by hand, I figured it couldn't be right unless my teacher was wrong.

    • 10 months ago
  77. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Can you copy it here? What you put in as the algorithm into your computer? I will try to follow it.

    • 10 months ago
  78. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I just want to see if I agree with your algorithm.

    • 10 months ago
  79. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Is that it above? The final draft of your program?

    • 10 months ago
  80. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    maybe you are accidentally getting 0. lol. i don't know.

    • 10 months ago
  81. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    or

    • 10 months ago
  82. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    like you did get the right answer with A(3,3)

    • 10 months ago
  83. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    maybe we can check another one.

    • 10 months ago
  84. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Let's look at A(2,5) Use program and let's do it by hand.

    • 10 months ago
  85. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    darn that is long. lol.

    • 10 months ago
  86. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    haha, yeah. Runs for around 15 seconds.

    • 10 months ago
  87. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    that is probably like a 100th of the output there. lol

    • 10 months ago
  88. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    is the answer always 0 when n>m?

    • 10 months ago
  89. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    No, for m = 1 and n = 2 I get A(1, 2) = A(0, A(1, 1) Answer: 4

    • 10 months ago
  90. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    For 2 and 3

    • 10 months ago
    1 Attachment
  91. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    A(1,2)=A(0,A(1,1)) =A(0,2) =2n =2n=2(2) since n=2. okay.did you computer also get 4 for A(1,2)?

    • 10 months ago
  92. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yep

    • 10 months ago
  93. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    hmmm... I get 16 by hand for A(2,3)

    • 10 months ago
  94. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, computer seems to be doing it right.

    • 10 months ago
  95. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Well I guess it is very possible that my teacher was wrong, idk.

    • 10 months ago
  96. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I don't know. There is a possibility I'm wrong. There is always a chance for that.

    • 10 months ago
  97. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Well there is a lot less possibility that you are wrong then I am wrong, so I guess I'll stick with that. :P

    • 10 months ago
  98. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I don't see anything wrong with your program. Maybe for most computers the algorithm will run too long. Not sure.

    • 10 months ago
  99. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Hard to tell, do you have time to look at one more thing really really quick?

    • 10 months ago
  100. myininaya Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    ok i will look no guarantees I will be able to help but i certainly will try

    • 10 months ago
  101. bbkzr31 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    http://openstudy.com/study#/updates/5276cbf2e4b0275c53855b4a Alright, thanks, wish I could give you another medal :/

    • 10 months ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.