Question

DISCRETE STRUCTURE Which of the following would not be a possible return value for the base...

DISCRETE STRUCTURE

Which of the following would not be a possible return value for the base case of a recursive algorithm to compute the sum of the first n odd numbers?

1

n (n + 1)

2n - 1

n2

Which counting rule is best suited to solving the following problem:

Imagine you are surveying a group of travellers. 45 have visited Spain, 39 have visited France, and 12 have visited Spain and France. How many travellers have been to Spain or France (or both)?

Product rule

Sum rule

Subtraction rule

Division rule

Homework Answers

Answer #1

Solution:

1)

The answer is n(n+1)

Explanation:

For any value of n, see that the value n(n+1) is even.

So this cannot be a return value for a algorithm that computes the sum of n odd numbers.

2)

The answer is Subtraction rule.

The subtraction rule is used in the following scenarios.

When a task can be done in n1 ways and another task can be done in n2 ways, then the total number of ways to do either of the task or both can be found using the subtraction rule.

Here, the number of travellers that have been to france or spain or both can be found using the subtraction rule.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • 1. The nucleus is a membrane-bound organelle that contains the cells genetic information. What other intracellular...
    asked 9 minutes ago
  • Do genetics play a significant role in human attraction? Defend a position (yes or no). Use...
    asked 31 minutes ago
  • 9.14 The quality-control manager at a compact flu-orescent light bulb (CFL) factory needs to determine whether...
    asked 36 minutes ago
  • Describe a business you are familiar with. Discuss ONE way this firm adjusts its short-term capacity...
    asked 50 minutes ago
  • Write a persuasive speech on whether online or face to face learning/education is better for students
    asked 59 minutes ago
  • (a) As an analyst briefly explain what you will consider in applying nested designs (b) State...
    asked 1 hour ago
  • Metals are good thermal conductors — that is, when there is a temperature difference across their...
    asked 1 hour ago
  • Theoretical Perspectives that attempts to explain and answer fundamental questions why societies form and why they...
    asked 1 hour ago
  • I am working with data analysis and with a survey. I am cleaning up the following...
    asked 1 hour ago
  • For this problem, carry at least four digits after the decimal in your calculations. Answers may...
    asked 1 hour ago
  • The International Air Transport Association surveys business travelers to develop quality ratings for transatlantic gateway airports....
    asked 1 hour ago
  • Unfortunately, arsenic occurs naturally in some ground water†. A mean arsenic level of μ = 8.0...
    asked 2 hours ago