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
Darina [25.2K]
3 years ago
9

PLZ HELPPPPPPPPPPPPPPPPPPPP

Computers and Technology
1 answer:
kari74 [83]3 years ago
8 0
C.....................
You might be interested in
Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
leonid [27]

Answer:

Total number of character comparison = 43

Explanation:

Using the Brute force algorithm

The string of n characters is known as text, and the string of m characters is known as the pattern.

From the given information:

The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED

The pattern (m) = GANDHI

The total no of characters that we have in the text = 47

The total number of characters in pattern = 6

For a brute force algorithm;

Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1

= 47 – 6 + 1

= 47 – 5

= 42

Thus; the algorithm will attempt the trial 42 times.

Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.

On each attempted trial, the algorithm will make one unsuccessful comparison.

However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.

Hence, we can calculate the total number of character comparison as follows:

Total number of character comparison = \mathbf{\bigg ( ( 42 -  (no. \ of \  failed \ comparison) ) \times 1 + (1 \times ( Two \ successful \  comparisons) ) \bigg ) }

Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )

Total number of character comparison = 41 + 2

Total number of character comparison = 43

3 0
3 years ago
Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line3 inFile >> x >> y; /
AnnyKZ [126]

Answer:

inFile.open("progdata.dat");

Explanation:

5 0
3 years ago
The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
Sergeu [11.5K]
164.109.0.0/17




-------------------------------------------
6 0
3 years ago
What is data that originated in another program or format?
Sergeeva-Olga [200]

Answer:

EXTERNAL DATA

Explanation:

EXTERNAL DATA

DDDDDDD

6 0
3 years ago
8.9 code practice edhesive
nadezda [96]

Answer:

.

Explanation:

7 0
2 years ago
Other questions:
  • Obtain a file name from the user, which will contain data pertaining to a 2D array Create a file for each of the following: aver
    5·1 answer
  • 15) the following statement describes government depository librearies , except:
    12·1 answer
  • What career cluster does a fish and game warden fall in?
    14·1 answer
  • If your problem is caused by a bad hardware or software installation and you get an error message the first time you restart the
    6·1 answer
  • _____ allow you to logically separate ports in switches to create subdomains without wiring your network as physical subdomains.
    7·1 answer
  • Which statement does not describe the guidelines for the use of text in presentation programs?
    7·1 answer
  • We can include following item(s) during configuration itemidentification:
    10·1 answer
  • 4. Write technical term for the following statements
    15·2 answers
  • ___ is a form of electronic money that is decentralized and whose transactions are encrypted, processed, and recorded via peer-t
    10·2 answers
  • Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!