Question

In: Statistics and Probability

A word that reads the same from left to right and right to left is a...

A word that reads the same from left to right and right to left is a palindrome. For example, "I", "noon" and "racecar" are palindromes. In the following, we consider palindromic integers. Note that the first digit of an integer cannot be 0.

How many positive palindromic integers are 5-digit long and contain 7 or 8?

Solutions

Expert Solution

Here there must be 5 digits and it shall contain 7 or 8 that means other two digitsshall be 7 or 8 only. Only one more number digit shall be varied.

so here total possibilities when 7 is the first digit that means last digit would be 7 also.

Here now for in between 3 numbers if the next digit is 8 then second last digit shall be 8 and there are 10 possibilities of middle digit so total possiblities = 10

now if 8 is the middle number than also there are 10 possibilites for digit place 2 and digit place 4.

Total possibilities when 7 is the first number = 10 + 10 = 20

Similarly there are total 20 possibilities when the first number is 8 = 20

Here if now the first digit is different than 7 or 8

then for first digit can have 9 values as 0 is not allowed. For middle 3 digits there is only two possibilities which is x787x and x878x.

so here total possibilities = 2 * 9 = 18

Total possibilities = 18 + 20 + 20 = 58


Related Solutions

1. A is called a palindrome if it reads the same from left and right. For...
1. A is called a palindrome if it reads the same from left and right. For instance, 13631 is a palindrome, while 435734 is not. A 6-digit number n is randomly chosen. Find the probability of the event that (a) n is a palindrome. (b) n is odd and a palindrome. (c) n is even and a palindrome.
A is called a palindrome if it reads the same from left and right. For instance,...
A is called a palindrome if it reads the same from left and right. For instance, 13631 is a palindrome, while 435734 is not. A 6-digit number n is randomly chosen. Find the probability of the event that (a) n is a palindrome. (b) n is odd and a palindrome. (c) n is even and a palindrome.
A palindromic number reads the same both ways (left-to-right and right-to-left). The largest palindrome made from...
A palindromic number reads the same both ways (left-to-right and right-to-left). The largest palindrome made from the product of two 2-digit numbers is 9,009 = 91 × 99. The largest palindrome made from the product of two 3-digit numbers is 906,609 = 913 × 993. The largest palindrome made from the product of two 4-digit numbers is 99,000,099 = 9,901 × 9,999. 1. Write a function IN JAVASCRIPT to find the largest palindrome made from the product of two 7-digit...
(Palindrome number - A number is a palindrome if it reads the same from right to...
(Palindrome number - A number is a palindrome if it reads the same from right to left and from left to right, for example 676 is a palindrome number) Write a program that prompts the user to enter a three-digit integer number and determines whether it is a palindrome number or not In Java Please
A palindrome is a word or phrase, which reads the same backward or forward. Write a...
A palindrome is a word or phrase, which reads the same backward or forward. Write a program that prompts the user for a string of characters terminated by a period and determines whether the string (without the period) is a palindrome. IMP: Assume that the input contains only letters and blanks. Assume also that the input is at most 30 characters long. Use an array of characters of size 30 to store the input! Disregard blanks when deciding if the...
2. Palindromes A palindrome is a word that reads the same forwards and backwards. For example,...
2. Palindromes A palindrome is a word that reads the same forwards and backwards. For example, \aibohphobia" (the irrational fear of palindromes) is a word that reads the same forwards and backwards. Write a function called isPalindrome() that accepts a string as a parameter and returns True if the string is a palindrome, False otherwise. Using the function you created, write a program Python home work Python
JAVA Palindrome Detector A palindrome is any word, phrase, or sentence that reads the same forward...
JAVA Palindrome Detector A palindrome is any word, phrase, or sentence that reads the same forward or backward. Here are some well-known palindromes: Able was I, ere I saw Elba A man, a plan, a canal, Panama Desserts, I stressed Kayak Write a boolean method that users recursion to determine where a String argument is a palindrome. The method should return true if the argument reads the same forward and backward. Demonstrate the method in a program. Include the following...
An excerpt from the Fourth Amendment reads: “The right of the people to be secure in...
An excerpt from the Fourth Amendment reads: “The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.” Suspecting a Mr. Flammer of running an illegal gambling and loan sharking operation, the FBI obtained a federal search...
1.In the human heart, blood is pumped from the left ventricle into the left atrium. right...
1.In the human heart, blood is pumped from the left ventricle into the left atrium. right atrium. pulmonary circuit. systemic circuit. 2.Systolic pressure is Group of answer choices the lowest blood pressure in the aorta. the pressure measured when the left ventricle is relaxed. the peak pressure in the aorta when the left ventricle contracts. the difference between the highest and lowest pressures. an average of high and low pressures. 3.The diastolic pressure for a normal young adult would be...
1. Explain the following. a. Compare the right and left ventricular pressures and right and left...
1. Explain the following. a. Compare the right and left ventricular pressures and right and left ventricular volumes. b. What will happen to cardiac output during exercise? Explain what physiological changes occur that cause this change in cardiac output?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT