All Exams Test series for 1 year @ ₹349 only
Question

The total number of unique character bigrams in the string thoughtsoftheghosts (which contains 19 characters) is ______.

Finding Unique Character Bigrams

A character bigram is a pair of two adjacent characters in a string. We need to find the number of distinct bigrams in the string $thoughtsoftheghosts$.

String Analysis

The input string is: $thoughtsoftheghosts$.

Generating Bigrams

We can list all possible adjacent pairs (bigrams) from the string:

  • th
  • ho
  • ou
  • ug
  • gh
  • ht
  • ts
  • so
  • of
  • ft
  • th
  • he
  • eg
  • gh
  • ho
  • os
  • st
  • ts

Identifying Unique Bigrams

Now, let's identify the unique bigrams from the list above. We only count each distinct pair once:

  1. th
  2. ho
  3. ou
  4. ug
  5. gh
  6. ht
  7. ts
  8. so
  9. of
  10. ft
  11. he
  12. eg
  13. os
  14. st

Counting Unique Bigrams

By counting the unique bigrams listed above, we find there are 14 distinct bigrams.

Therefore, the total number of unique character bigrams in the string $thoughtsoftheghosts$ is 14.

Was this answer helpful?

Important Questions from Numerical Computation

  1. In an engineering college of 10,000 students, 1,500 like neither their core branches nor other branches. The number of students who like their core branches is 1/4th of the number of students who like other branches. The number of students who like both their core and other branches is 500.
    The number of students who like their core branches is

  2. $A$ is an ($n \times n$) matrix. Consider the following two statements 

    Statement 1: Columns of matrix $A$ are linearly independent 

    Statement 2: Inverse of matrix $A$ exists 

    Which one of the following statements is TRUE?

  3. Consider the function $G(x, y, z) = 0$. This function allows us to implicitly define each of three variables as a function of the other two variables. Assume that all partial derivatives of the function $G(x, y, z)$ exist everywhere. Then, the value of $\left(\frac{\partial z}{\partial x} \times \frac{\partial x}{\partial y} \times \frac{\partial y}{\partial z}\right)$ is _________ (in integer)
  4. Levenshtein distance is used to measure the minimum edit distance between two strings by counting the minimum number of editing operations (such as, insertions, deletions, substitutions) required to transform one string to another. Consider an alternative version of the Levenshtein distance in which each insertion and each deletion has a cost of 1 and substitutions are not allowed.

    Based on this alternative version, the Levenshtein distance between the strings, word and work is ______ (Answer in integer).
  5. In a given collection of documents, let $N$ be the total number of documents and let $d$ be the number of documents in which the term $t$ occurs.

    Which ONE of the following fractions is used to define the inverse document frequency (idf) of the term $t$?
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App