Self Studies

Computer Science Test - 1

Result Self Studies

Computer Science Test - 1
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    2 / -0.66

    The technique for using one set of addresses inside a network and remapping those addresses to a different set of addresses that are seen outside the local network on the Internet is called

    Solution

    Network address translation (NAT):

    • Allow multiple devices to access the internet through a single public IP address.
    • NAT is the process in which one or more local network IP address (private IP address) is translated into one more Public IP address in order to provide internet access to the local hosts.

    Address resolution (ARP):

    It converts IP address (logical address) to the MAC address(physical address).

    Virtual LAN:

    Virtual LAN allows a network manager to logically segment a LAN into different broadcast domains

    Hence option 1is the correct answer.

  • Question 2
    2 / -0.66

    Consider the relation R(X, Y, Z, W, V) in which X, Y, Z, W, and V are the attributes and the following set of functional dependencies

    A = { {X, Y} → {Z, W},  {X, W, V} → {Y, Z}  }

    Which of the following is the trivial functional dependency in A+, where A+ is closure of A?

    Solution

    Concept:

    The closure of F, denoted as F+, is the set of all regular FD, that can be derived from.

    For trivial functional dependency,

    Let A and be two sets consists of attributes of a relation

    A → B

    A ⊇⊇ B 

    Explanation:

    Option 1:

    {X, Z} → {Z, W}

    {X, Z}  ⊉⊉ {Z, W}

    Not a trivial functional dependency

    Option 2:

    {X, V} → {V}

    {X, V} ⊇⊇ {V}

    It is a trivial functional dependency

    Option 3:

    {X, W, V} → {Y}

    {X, W, V} ⊉⊉  {Y}

    Not a trivial functional dependency

    Option 4:

    {Y, W } → {Y, X}

    {Y, W } ⊉⊉ {Y, X}

    Not a trivial functional dependency

    NOTE:

    ⊇⊇ → superset

    ⊉⊉ → not superset

  • Question 3
    2 / -0.66

    A hash table of length(m) 11 uses open addressing and linear probing. After inserting 9 values into an empty hash table, the table is as shown below.

    0

     

    1

    10

    2

    41

    3

    22

    4

    80

    5

    63

    6

    25

    7

     

    8

    17

    9

    8

    10

    18

    Which one of the following hash function will distribute elements as shown in above hash table.

    Solution

    For linear probing with open addressing, the hash function plays a crucial role in determining the sequence of slots to check when a collision occurs.

    EXPLANATION:

    Given hash table:

    0

     

    1

    10

    2

    41

    3

    22

    4

    80

    5

    63

    6

    25

    7

     

    8

    17

    9

    8

    10

    18

    The hash table is of length m = 11m and open addressing with linear probing is used. In linear probing, when a collision occurs, you linearly search for the next available slot.

    Now, let's evaluate the given hash functions:

    Let's analyze option 2 why it is correct, let's consider the elements inserted into the hash table:

    1. k = 10 goes to slot 1 since 1 + (10 mod (11-1)) = 1 + 0  = 1.
    2. k = 41 goes to slot 2 since 1 + (41 mod (11-1)) = 1 + 1 = 2.
    3. k = 22 goes to slot 3 since 1 + (22 mod (11-1)) = 1 + 2 = 3.
    4. k = 80 goes to slot 4 since 1 + (80 mod (11-1)) = 1 + 0 = 1. Slot 1 is Full so we put next blank hash.
    5. And so on.

    Option 2 produces a distribution that aligns with the given hash table. It effectively uses the modulo operation with m = 11 to ensure that the resulting index stays within the bounds of the hash table. This is suitable for linear probing in an open-addressing scheme, providing a sequence of indices to check when resolving collisions.

     

  • Question 4
    2 / -0.66

    Consider a cache memory with L lines in which cache is divided into S sets each set is containing K lines. This set associative mapping is reduce to associative mapping when

    Solution

  • Question 5
    2 / -0.66

    Which one is the correct translation of the following statement into mathematical logic?

    “None of my friends are perfect.”

    Solution

    Statement: None of my friends are perfect

    From option it can be considered:

    p(x) – x is my friend

    q(x) – x is perfect

    In mathematical logic form:

    “All my friends are imperfect” means

    ∀x (p(x) → ¬ q(x))

    ∀x (¬p(x) ∨ ¬q(x))

    ∀x ¬(p(x) ∧ q(x))

    ¬∃x (p(x) ∧  q(x))

  • Question 6
    2 / -0.66

    Considering LR(0) SLR, LR and LALR parsing which will have unequal number of states in LR item DFA?

    Solution

    Answer: Option 2

    Explanation

    The question is asking for the unequal number of states 

    Hence SLR, LR(0), and LALR will have the same number of states in Item DFA.

    Hence Only 2 will have a different number of states.

  • Question 7
    2 / -0.66

    If the characteristic roots of  are λ1 and λ2 the characteristic root of  are

    Solution

    Concept:

    1. If λ1 and λ2 are the characteristic roots of square matrix such that |A| ≠ 0, then the characteristic roots of A-1 are 1/λ1 and 1/λ 

    2. If A is non-singular matrix, then, AA-1 = I 

    Calculation:

  • Question 8
    2 / -0.66

    The conditional probability of event A given event B is defined as:

    Solution

    Explanation:

    Conditional property is the probability of an event occurring given that another event has already occurred.

    We represent the probability of event A given event B as P(A/B).

    So, the probability of occurrence of event A given that B has occurred is:

    where, P (A ꓵ B) = probability that both the events A and B occur at the same time.

  • Question 9
    2 / -0.66

    What is the size of the physical address space in a paging system which has a page table containing 64 entries of 11 bit each (including valid/invalid bit) and a page size of 512 bytes?

    Solution

    The correct answer is option 3.

    Data

    page table entries = 64

    page table entry size = 11 bit

    page size = 512 bytes

    Formula:

    Size of physical address = pagging bits + offset bits

    Calculation:

    paging bits = 11 - 1 = 10(as 1 valid bit is also included)

    offset bits = log(512) = 9 bits

    size of physical address = 10 + 9 = 19 bits

    Hence the correct answer is 219.

     

  • Question 10
    2 / -0.66

    In a circularly linked list organization, insertion of a record involves the modification of

    Solution

    Circular linked list:

    In singly linked lists and doubly linked lists, the end of lists is indicated with a NULL value. But circular linked lists do not have ends. In circular linked lists, each node has a successor, and the last node points to the first node instead of NULL.

    Example

    Let x be a variable pointer and head.

    Head is the pointer of the circular linked list.

    Now to insert a new record (node) y, we have to loop through the linked list from the head to the last node like this pseudocode below.

    x=head

    while(x->next!=head)

    {

       x=x->next;

    }

    After finishing the loop x is now the last node and we will append the list. y is the next node of x Then the next of y will have to point to the head since the linked list is circular. The pseudocode for this task is below.

    x->next=y;

    y->next=head; 

    So There needs modification of two pointers

    So the correct answer is Option 3

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now