Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:26:07+00:00 2026-06-06T08:26:07+00:00

In my home work of Ackermann function I have solved the problem as following

  • 0

In my home work of Ackermann function I have solved the problem as following

int main()
{
    int y = ack(4,1);
    cout<<"ans is :::: "<< y;

    getch();
    return 0;
}

int ack(int m, int n)
{
    if(m == 0)
    {
        return n+1; 
    }
    else if(m > 0 && n == 0)
    {
        return ack(m-1,1);  
    }
    else if(m > 0 && n>0)
    {
        int x = ack(m,n-1);
        return ack(m-1,x);
    }
    else 
    {
        cout<< "did not worked properly";
    }   
}

This function works great with low values upto m=3 and n = 10
But when I give m = 4/above or n = 15/above this don’t work. I get no out put. Program just exit without any warning or error or result.

Please some body tell me the reason why this is happening and how can I solve this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:26:09+00:00Added an answer on June 6, 2026 at 8:26 am

    The number (4, 15) is such a big number that is impossible to calculate and represent. Look at the table of values. For example (4, 2) is orders of magnitude bigger than number of particles in the observable universe!

    I had a similar homework. The whole point is to show you how insanely something can grow. Humans have problem to grokk exponential growth which is pale in comparison to Ackermann function.

    Thinking about big numbers can lead to interesting conclusions. Imagine, you are walking along the road which is 2^2^65536 - 3 meters long (that’s ackermann(4, 3)). Assuming that average human body is roughly equal to 1m^3 it has got 10^10^70 quantum states. Going down the road you will meet your doppelgangers – exact doppelgangers on quantum level! So they will have execly same thoughts, same scars, itchy elbow in the same spot. They even going to digest same food. You will meet billions of billions of billions doppelgangers. For me, it’s really mind-blowing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem with this home work assignment. I can handle the syntax,
I'm doing some JAVA coding at home and at work. At home i have
I thought the following line of code should work fine: $(.1).attr('href', '#Home'); Right? But
I have written this code for myself(it is not a home work) I want
This looks very trivial and is not a home work question. public void sum(int[]
I have a contact entity that has >1 phone number contact[contact, name, cell,work,home...] and
I have home work for parsing XML This is the xml : <?xml version=1.0
I have this home work where I have to transfer a very big file
Why does the following code: <%= Html.ActionLink([Click Here For More +], Work, Home, new
We have a class home work for design pattern class. In that we have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.