Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

Students also viewed these Databases questions

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago