Question: Write an equation as each answer. 1.My program uses nested loops. The outer loop goes through each slot of my array with N slots.The inner

Write an equation as each answer.

1.My program uses nested loops. The outer loop goes through each slot of my array with N slots.The inner loop goes through each slot of the array.How many times an operation inside the inner loop is done?

2. There are N people and 4 rooms. Each person can choose which room to enter. How many possibilities are there of who will be in which rooms? (Hint: 4 possibilities per person)

3. My program uses recursion. Each time it calls F, the array (N slots) gets shorter by one slot until there are no slots left. How many times will F get called?

4. My program uses recursion. Each time it calls F, the array (N slots) becomes the size until there are no slots left. How many times will F get called?

5. My program plays chess perfectly. Assuming that there are 35 possible moves each time and each game ends in about 80 moves, my program examines every possible path before making the first move. How many board states will have to be examined?

Think of a tree (B = 80) and count the number of nodes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!