1. How many different ways can you have r numbers 1 sum up to a number...
1) A Ramanujam number can be written two different ways as the sum of two cubes—i.e. , there exist distinct a, b, c, and d such that a3 +b3 = c3 +d3. Generate all Ramanujam numbers where a, b, c, d < n. 3-18. What method would you use to look up a word in a dictionary? 3-19. Imagine you have a closet full of shirts. What can you do to organize your shirts for easy retrieval? 3-20. Write a...
Set 5 a. A staircase has 10 steps. You walk up taking one or two at a time. How many ways can you go up? We have n dollars to spend. Every day we either buy a candy for 1 dollar, or an ice cream for 2 dollars. In how many ways can we spend the money? Explain for n-5, and then conjecture for n dollars. Prove your conjecture. Define Fibonacci numbers completely. Why do you need two initial values?...
use python: Write a program that reads in X whole numbers and outputs (1) the sum of all positive numbers, (2) the sum of all negative numbers, and (3) the sum of all positive and negative numbers. The user can enter the X numbers in any different order every time, and can repeat the program if desired. Sample Run How many numbers would you like to enter? 4 Please enter number 1: 3 Please enter number 2: -4 Please enter...
2. How many ways can you pick a license plate with 3 letters, then 4 numbers? 3. How many ways can you list 4 numbers out of a list consisting of 7 numbers without repetition?
1. How many ways can a group of six boys and sik girls be seated in a row of twelve seats if boys and girls must alternate in the row? ways 2. How many ways can 4 different contracts be distributed amongst 15 different firms, if any one firm can be awarded multiple contracts? ays 3. How many four-digit numbers may be formed using elements from the set (1, 2, 3,4, 5,6,7,8,9) if no element may be used more than...
guided exercise 11, pg. 225 a. evaluate 31. 31 = 3, 2, 1 = 6 b. in how many different ways can three objects be arranged in order? how many choices do you have for the first position? for the second nd position? for the third position? you have three choices for the first pos. two for the second pos. and one for the third pos. by the multiplication you have (3) (2) (1) = 31 = 6 arrangements
Java Programmming Given three numbers from user input, decrement the first number by 2 and increment the second number by 1, Then do the magic calculations as follows: get the sum of the first two numbers, deduct the third number from the second and get the product of the first and third number, then sum up the results of the three magic calculations. Sample run 1: Enter three numbers separated by spaces: 4 2 3 Output: Result of Magic calculations...
You have 6 yellow flowers and 4 red flowers. How many different (unique) ways could you lay out the flowers in a row? e.g., RYRYRYRYYY is one way
Problem 2 a) In how many ways can 6 women and 5 men line up so that no two men are next to one another? b) In how many ways can 7 different pairs of twins line up so that twins must be next to one another? c) In how many ways can 7 women and 10 men sit at a circular table so that no two women are sitting side by side? d) How many strings of length 5...