answer.
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
mr_godi [17]
2 years ago
3

Michelle has created a word game for her students. the word game begins with michelle writing a string and a number, k, on the b

oard. the students must find a substring of size k such that there is exactly one character that is repeated one; in other words, there should be k - 1 distinct characters in the substring.
Mathematics
1 answer:
Umnica [9.8K]2 years ago
6 0
This question is incomplete. However, a possible algorithm to find a solution would be:

let String be the string written by the teacher
let k be the size of the substrings
let L be a set of substrings of length k
let M be a set of substrings of length k with k-1 distinct characters 
let temp be a temporary string
while String >= k {
    let temp be the first four characters of String
    add temp to L
    delete the first character of String
}
For each substring in L{
   int distinct_characters = 4
   for int i = 1 to 3 {
        char t = ith character of substring
         for int j = i to 4{
               if jth character of substring = t then{
                    distinct_characters = distinct_characters - 1
               }
         }
   }
   if distinct_characters = 3 then{
       add substring to M
   }   
}
  
You might be interested in
Two major automobile manufacturers have produced compact cars with engines of the same size. We are interested in determining wh
snow_tiger [21]

Answer:

Step-by-step explanation:

Corresponding fuel efficiencies of manufacturer A's car and manufacturer B's car form matched pairs.

The data for the test are the differences between the efficiencies of manufacturer A's car and manufacturer B's car

μd = fuel efficiency of manufacturer A's car minus the​ fuel efficiency of manufacturer B's car.

A B diff

32 28 4

27 22 5

26 27 - 1

26 24 2

25 24 1

29 25 4

31 28 3

25 27 - 2

Sample mean, xd

= (4 + 5 - 1 + 2 + 1 + 4 + 3 - 2)/8 = 2

xd = 2

Standard deviation = √(summation(x - mean)²/n

n = 8

Summation(x - mean)² = (4 - 2)^2 + (5 - 2)^2 + (- 1 - 2)^2 + (2 - 2)^2 + (1 - 2)^2 + (4 - 2)^2 + (3 - 2)^2 + (- 2 - 2)^2 = 44

Standard deviation = √(44/8

sd = 2.35

For the null hypothesis

H0: μd = 0

For the alternative hypothesis

H1: μd ≠ 0

This is a two tailed test and the distribution is a students t. Therefore, degree of freedom, df = n - 1 = 8 - 1 = 7

2) The formula for determining the test statistic is

t = (xd - μd)/(sd/√n)

t = (2 - 0)/(2.35/√8)

t = 2.41

We would determine the probability value by using the t test calculator.

p = 0.047

Since alpha, 0.1 > the p value 0.047, then we would reject the null hypothesis. Therefore, at 1% significance level, we can conclude that there is a significant difference in the mean MPG (miles per gallon) when testing for the fuel efficiency of these two brands of automobiles.

6 0
2 years ago
The distance between New York and Philadelphia by railroad is 90 miles; the distance between them by river and ocean is 240 mile
VladimirAG [237]
Start with 90/240, then reduce the fraction
you can reduce by dividing each by 10 to get 9/24
reduce more from there, seeing that each number can be divided by 3
9/3  = 3
24/3 = 8
answer 3/8

3 0
2 years ago
Aarti bought a square shaped table cloth for her home the side of the table cloth measures 2 1/3m what is the area of the table
PSYCHO15rus [73]

Answer:

Area of table cloth =  49/9 m² or 5.44 m²

Step-by-step explanation:

Given:

Side of table cloth  = 2\frac{1}{3}m = 7/3 m

Shape of cloth is square

Find:

Area of table cloth

Computation:

Area of square = side²

So,

Area of table cloth = side²

Area of table cloth = (7/3)²

Area of table cloth =  49/9 m² or 5.44 m²

3 0
1 year ago
Alexa owns a total of 45 fiction and nonfiction books. If the number of fiction books is 15 more than 4 times the number of nonf
Vikentia [17]
What are the choices?
4 0
2 years ago
1. HELP Use front-end estimation to estimate the sum 8.86 + 9.43 + 5.75
marta [7]

Answer:

1. Option D.

2. Option A.

Step-by-step explanation:

1. You need to follow these steps in order to estimate the sum of 8.86 + 9.43 + 5.75:

Step 1: Add the digits in the ones places of the whole numbers (these are: 8, 9 and 5).

Step 2: Round the decimals to the nearest whole number:

0.86\approx 1\\\\0.43\approx0\\\\0.75\approx1

 Step 3: Add them together:

8+9+5+1+0+1=8+9+5+2=24

2. The procedure to estimate  the difference of 83.92-47.23 is:

83.92-\\47.23\\........\\40.00\\\ -4.00\\\ \ + 0.70\\-0.01\\...........\\+36.00\\+0\ 0.69\\..............\\36.69

Rounded to the nearest whole number:

36.69\approx 37

5 0
2 years ago
Other questions:
  • Mr Henderson has 2 bouncy ball vending machines , he buys one bag of the 27 millimeter balls and one bag of the 40 millimeter ba
    15·2 answers
  • The function y = square root sign x is translated using the rule (x, y) → (x – 7, y + 2)to create f(x). What is the domain of f(
    11·2 answers
  • what are some advantages of writing the polynomial expression -7x^2+32x+240 in factored form when interpreting this situation ​
    8·1 answer
  • Which graph represents y=3 sqrt x+2
    7·1 answer
  • Find conditions on k that will make the following system of equations have a unique solution. To enter your answer, first select
    5·1 answer
  • Darnell is constructing a rectangle window frame. He measured the length, the width, and the diagonal as 26 inches, 32 inches, a
    15·2 answers
  • Traveling carnivals move from town to town, staying for a limited number of days before moving to the next stop. The management
    13·2 answers
  • Which of the following assessment types has the greatest effect on your overall grade?
    7·1 answer
  • At an archeological site, the remains of two ancient step pyramids are congruent. If ABCD~=EFGH, find AD
    7·1 answer
  • An online application charges $1.25 to download a song and $10.99 membership fee. Write an expression that gives the total cost
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!