1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
True [87]
3 years ago
5

How many strings of eight lower-case English letters are there that contain the two letters bg, in that order, with the further

constraint that no letters can be repeated?
Computers and Technology
1 answer:
3241004551 [841]3 years ago
6 0

Answer:  678,363,840

Explanation:

Hi!

The "bg" part of the string could be in 7 possible positions within the string. If we number the characters in the string from 0 to 7, the "b" of "bg" could be in positions 0 to 6.

We need to count the possibilities for the other 6 characters. They can be any of the 26 lower-case letters, but not b nor g, because no letters can be repeated. So we can choose 6 letters from 24 letters, without repetition, and the order is important. The number of such combinations is:

n = 24,\; m = 6\\\frac{n!}{(n-m)!} = \frac{24!}{18!} = 96,909,120

For the total number of strings, we have to multiply with the 7 possible position of "bg". Then, the final number is 678,363,840

You might be interested in
You are responsible for a rail convoy of goods consisting of several boxcars. You start the train and after a few minutes you re
maks197457 [2]

Answer:

The program in C++ is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

   int cars;

   cin>>cars;

   double weights[cars];

   double total = 0;

   for(int i = 0; i<cars;i++){

       cin>>weights[i];

       total+=weights[i];    }

   double avg = total/cars;

   for(int i = 0; i<cars;i++){

       cout<<fixed<<setprecision(1)<<avg-weights[i]<<endl;    }

   return 0;

}

Explanation:

This declares the number of cars as integers

   int cars;

This gets input for the number of cars

   cin>>cars;

This declares the weight of the cars as an array of double datatype

   double weights[cars];

This initializes the total weights to 0

   double total = 0;

This iterates through the number of cars

   for(int i = 0; i<cars;i++){

This gets input for each weight

       cin>>weights[i];

This adds up the total weight

       total+=weights[i];    }

This calculates the average weights

   double avg = total/cars;

This iterates through the number of cars

   for(int i = 0; i<cars;i++){

This prints how much weight to be added or subtracted

       cout<<fixed<<setprecision(1)<<avg-weights[i]<<endl;    }

4 0
2 years ago
When was kale discovered?
anyanavicka [17]
Kale was discoverd just 2 years ago ........
8 0
3 years ago
My speaker on my phone is not working, when I try and play music and videos the sound dosen't work. However my alarm works. Can
SVEN [57.7K]
Try turning off your phone or resetting it
7 0
2 years ago
Read 2 more answers
What do you mean by data sequencing​
Shalnov [3]

Answer:

Data sequencing is the sorting of data for inclusion in a report or for display on a computer screen.

Explanation:

8 0
2 years ago
g Design a Boolean function called isPrime, that accepts an integer as an argument and returns True if the argument is a prime n
professor190 [17]

Answer:

#include <bits/stdc++.h>

using namespace std;

bool isPrime(int n)

{

   for(int j=2;j<=n-1;j++)  //loop to check prime..

   {

       if(n%j==0)

       return false;

   }

   return true;

}

int main(){

   int n;

   cout<<"Enter the integer"<<endl;//taking input..

   cin>>n;

   if(isPrime(n))//printing the message.

   {

       cout<<"The number you have entered is prime"<<endl;

   }

   else

   {

       cout<<"The number is not prime"<<endl;

   }

return 0;

}

Output:-

Enter the integer

13

The number you have entered is prime

Explanation:

The above written program is in C++.I have created a function called isPrime with an argument n.I have used a for loop to check if the number is prime or not.In the main function I have called the function isPrime for checking the number is prime or not.

4 0
3 years ago
Other questions:
  • How can vlan hopping attacks be prevented on a network?
    10·1 answer
  • Malware that corrupts the target operating system in such a manner that a network defender can no longer trust the native OS is
    15·1 answer
  • Word's Help feature is useful if you need to quickly learn how to print a document
    14·1 answer
  • Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
    14·2 answers
  • Use induction on n to prove that fir all n&gt;=2, 2^n+3^n&lt;5^n
    11·1 answer
  • Write the definition of a class WeatherForecast that provides the following behavior (methods): A method called set_skies that h
    13·1 answer
  • What is the best motivation that you can do/give to make your employees stay? ​
    6·1 answer
  • How many total cells can a worksheet window contain? If columns are labelled alphabetically, what will be the label for the cell
    15·1 answer
  • What is the school wifi password trying to do my class work in school on different devices.
    9·1 answer
  • The following is a function:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!