Loading...
Ministry of Power, Energy and Mineral Resources

Post: Assistant Maintenance Engineer;
Exam Date: 30 May, 2025 Exam Taker: BPSC
1 (a) What is 2-factor authentication? Describe it with an example.

Two-Factor Authentication (2FA) is a security method that requires two different types of verification to confirm a user’s identity before allowing access to a system or account. It adds an extra layer of security beyond just a password.

Usually, the two factors include something the user knows (like a password) and something the user has (like a mobile phone or security code).

Example:
When logging into an online banking account, the user first enters their username and password. After that, the system sends a One-Time Password (OTP) to the user’s mobile phone. The user must enter this OTP to complete the login process.

Thus, access is granted only after verifying both the password and the OTP.

Two-Factor Authentication (2FA) হলো একটি security পদ্ধতি যেখানে কোনো system বা account-এ প্রবেশ করার আগে ব্যবহারকারীর পরিচয় যাচাই করার জন্য দুই ধরনের verification প্রয়োজন হয়। এটি শুধুমাত্র password-এর উপর নির্ভর না করে অতিরিক্ত security প্রদান করে।

সাধারণত এই দুইটি factor হলো ব্যবহারকারী যা জানে (যেমন password) এবং ব্যবহারকারী যা পায় (যেমন mobile phone বা security code)।

Example:
যখন কেউ online banking account-এ login করে, প্রথমে তাকে username এবং password দিতে হয়। এরপর system ব্যবহারকারীর mobile phone-এ একটি One-Time Password (OTP) পাঠায়। ব্যবহারকারীকে সেই OTP প্রবেশ করাতে হয়।

এইভাবে password এবং OTP উভয়টি যাচাই করার পরই account-এ প্রবেশ করা যায়।

1 (b) What is hash table? What are the advantages of using hash table
A hash table is a data structure used to store data in the form of key–value pairs. It uses a special function called a hash function to convert a key into an index (position) in an array where the corresponding value is stored.Because the index is calculated directly using the hash function, data can be accessed very quickly.Advantages of Hash Table
  • Fast Data Access: Searching, insertion, and deletion operations are very fast, usually taking O(1) average time.
  • Efficient Data Storage: Data can be stored and retrieved quickly using keys.
  • Useful for Large Data: Hash tables work efficiently when handling large amounts of data.
  • Direct Access: The hash function directly maps keys to memory locations, reducing the need for searching.
Hash table হলো একটি data structure যেখানে data key–value pair আকারে সংরক্ষণ করা হয়। এতে একটি বিশেষ function ব্যবহার করা হয় যাকে hash function বলা হয়, যা একটি key-কে array-এর একটি নির্দিষ্ট index-এ রূপান্তর করে।এই index ব্যবহার করে খুব দ্রুত data access করা যায়Hash Table-এর সুবিধা
  • দ্রুত Data Access: Searching, insertion এবং deletion operation খুব দ্রুত হয় এবং সাধারণত O(1) সময় লাগে।
  • Efficient Storage: Key ব্যবহার করে data সহজে সংরক্ষণ ও retrieve করা যায়।
  • Large Data Handling: বড় পরিমাণ data পরিচালনার জন্য hash table খুব কার্যকর।
  • Direct Access: Hash function সরাসরি key-কে memory location-এ map করে, ফলে দ্রুত data পাওয়া যায়।
1 (c) Explain the rule of BIOS (Basic Input Output System) in the boot process of a PC Describe the steps involved in booting a computer from power on to loading the operating system.
Role of BIOS in the Boot Process of a PCThe BIOS (Basic Input Output System) is a firmware stored in the motherboard. It starts the computer when the power is turned on and prepares the hardware to load the operating system.BIOS performs hardware initialization, checks system components, and then loads the operating system from a bootable device.Steps in Booting a Computer
  • Power On: When the computer is powered on, the CPU begins executing instructions stored in the BIOS.
  • POST (Power-On Self Test): BIOS performs POST to check hardware components such as RAM, keyboard, and storage devices.
  • Boot Device Detection: BIOS searches for a bootable device like a hard disk, SSD, CD/DVD, or USB according to boot priority.
  • Loading Bootloader: BIOS loads the bootloader program from the selected boot device into memory.
  • Operating System Loading: The bootloader loads the operating system kernel into memory, and the operating system starts running.
PC-এর Boot Process-এ BIOS-এর ভূমিকাBIOS (Basic Input Output System) হলো motherboard-এ সংরক্ষিত একটি firmware যা computer চালু হওয়ার সময় system শুরু করে। এটি hardware initialize করে এবং operating system load করার জন্য system প্রস্তুত করে।BIOS প্রথমে hardware পরীক্ষা করে এবং তারপর bootable device থেকে operating system load করতে সাহায্য করে।Computer Boot হওয়ার ধাপসমূহ
  • Power On: Computer চালু হলে CPU BIOS-এর instruction execute করা শুরু করে।
  • POST (Power-On Self Test): BIOS RAM, keyboard এবং storage device-এর মতো hardware component পরীক্ষা করে।
  • Boot Device Detection: BIOS boot priority অনুযায়ী hard disk, SSD, CD/DVD বা USB-এর মতো bootable device খুঁজে।
  • Loading Bootloader: নির্বাচিত boot device থেকে bootloader memory-তে load করা হয়।
  • Operating System Loading: Bootloader operating system kernel memory-তে load করে এবং operating system চালু হয়।
2. (a) Apply the Krushkal's algorithm for the following graph to find out the cost of the Minimum Spanning Tree (MST).


The minimum spanning tree value is: 410+612+310+200=1532

2. (b) What is heap sort? Build a heap tree from the following list of numbers: [44, 30, 50, 22, 60, 55, 70, 55].

Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure.
It first builds a heap (usually a Max Heap) from the input data, and then repeatedly
removes the largest element from the heap and rebuilds the heap until the list is sorted.

Steps of Heap Sort:
1. Build a Max Heap from the given data.
2. Swap the root (largest element) with the last element.
3. Reduce the heap size by one.
4. Heapify the root again.
5. Repeat until the heap size becomes 1.

Build a Max Heap from the list:
[44, 30, 50, 22, 60, 55, 70, 55]


Step 1: Insert elements and adjust to maintain Max Heap property.

Final Max Heap (array form):
[70, 60, 55, 55, 30, 50, 44, 22]


Heap Tree Representation:

                70
             /      \
           60        55
         /   \      /   \
       55    30    50    44
      /
    22

3. (a)Write down a program in any high level language to read an integer and display a pattern like below. For example, if the given integer number is 1234 then the following pattern will be printed.

1234
234
34
4

#include<stdio.h> 
#include <string.h>

int main() {
    char num[50];
    printf("Enter an integer: ");
    scanf("%s", num);
    int len = strlen(num);
    for(int i = 0; i < len; i++) {
        // print spaces
        for(int s = 0; s < i; s++) {
            printf(" ");
        }
        // print remaining digits
        for(int j = i; j < len; j++) {
            printf("%c", num[j]);
        }
        printf("\n");
    }
    return 0;
}
Sample Input:
Enter an integer: 1234

Sample Output:
1234
 234
  34
   4
3(b) What is friend function? Given the following class, show how to add a friend function, named isneg() that takes one parameter of type myclass and return true if nun is negative and false otherwise. class myclass { int num; public: myclass(int i) { num=i; }};

A friend function is a function that is not a member of a class but is allowed to access the private and protected members of the class. It is declared inside the class using the friend keyword.

Friend Function on given Class:

#include <iostream>
using namespace std;
class myclass {
    int num;
public:
    myclass(int i) { 
        num = i; 
    }
    // friend function declaration
    friend bool isneg(myclass obj);
};

// friend function definition
bool isneg(myclass obj) {
    if (obj.num < 0)
        return true;
    else
        return false;
}

int main() {
    myclass a(-10);

    if (isneg(a))
        cout << "Number is negative";
    else
        cout << "Number is positive";
    return 0;
}
4. (a) Describe the following terms:
(i) Supervised learning

Supervised learning is a type of machine learning where the model is trained using labeled data. In this method, the input data is provided along with the correct output, and the algorithm learns the relationship between them to make predictions.

The goal of supervised learning is to learn a mapping from inputs to outputs so that the system can predict the correct result for new unseen data.

Example:
In an email spam detection system, the model is trained with emails labeled as “spam” or “not spam”. After training, the system can classify new emails as spam or non-spam automatically.

Supervised learning হলো একটি machine learning পদ্ধতি যেখানে model-কে labeled data ব্যবহার করে train করা হয়। এখানে input data-এর সাথে সঠিক output দেওয়া থাকে এবং algorithm সেই সম্পর্ক শিখে ভবিষ্যতে নতুন data-এর জন্য সঠিক ফলাফল অনুমান করতে পারে।

Supervised learning-এর মূল লক্ষ্য হলো input এবং output-এর মধ্যে সম্পর্ক শিখে ভবিষ্যতে সঠিক prediction করা

Example:
একটি email spam detection system-এ model-কে এমন email দিয়ে train করা হয় যেগুলো “spam” বা “not spam” হিসেবে label করা থাকে। এরপর system নতুন email দেখে তা spam নাকি না তা নির্ধারণ করতে পারে।

4. (a)(ii) Unsupervised learning

Unsupervised learning is a type of machine learning where the model is trained using unlabeled data. In this method, the algorithm tries to find patterns, structures, or relationships within the data without any predefined output labels.

The goal of unsupervised learning is to discover hidden patterns or group similar data automatically.

Example:
In customer segmentation, a company may have a large dataset of customer purchasing behavior but no predefined categories. An unsupervised learning algorithm can analyze the data and group customers into different clusters based on their buying patterns.

Unsupervised learning হলো একটি machine learning পদ্ধতি যেখানে model-কে unlabeled data ব্যবহার করে train করা হয়। এখানে input data-এর সাথে কোনো নির্দিষ্ট output label দেওয়া থাকে না।

এই পদ্ধতিতে algorithm নিজেই data বিশ্লেষণ করে pattern, structure বা similarity খুঁজে বের করে।

Example:
Customer segmentation-এ একটি কোম্পানির কাছে অনেক customer-এর purchasing data থাকে কিন্তু আগে থেকে কোনো category নির্ধারিত থাকে না। তখন unsupervised learning algorithm data বিশ্লেষণ করে একই ধরনের behavior থাকা customer-দের বিভিন্ন group বা cluster-এ ভাগ করে।

4. (a)(iii) Reinforcement learning

Reinforcement learning is a type of machine learning where an agent learns by interacting with an environment and receiving rewards or penalties for its actions.

The main goal of reinforcement learning is to learn the best sequence of actions that maximizes the total reward over time.

In this method, the system improves its performance through trial and error. Correct actions receive rewards, while incorrect actions receive penalties.

Example:
In a robot navigation system, a robot learns how to reach a destination. If it moves in the correct direction, it receives a reward. If it moves in the wrong direction or hits an obstacle, it receives a penalty. Over time, the robot learns the best path to reach the destination.

Reinforcement learning হলো একটি machine learning পদ্ধতি যেখানে একটি agent environment-এর সাথে interaction করে এবং তার কাজের জন্য reward বা penalty পায়।

এই পদ্ধতির মূল লক্ষ্য হলো এমন একটি action sequence শেখা যাতে মোট reward সর্বাধিক হয়।

এখানে system trial and error পদ্ধতিতে শিখে। সঠিক কাজ করলে reward পাওয়া যায় এবং ভুল কাজ করলে penalty পাওয়া যায়।

Example:
একটি robot navigation system-এ robot environment-এর মধ্যে চলাচল শিখে। যদি robot সঠিক দিকে এগোয় তাহলে reward পায়, আর যদি ভুল দিকে যায় বা obstacle-এ ধাক্কা খায় তাহলে penalty পায়। এভাবে robot ধীরে ধীরে সঠিক পথ শিখে ফেলে।

4(b) Given following values:
True Positive (TP) = 560
True Negative (TN) = 330
False Positive (FP) = 60
False Negative (FN) = 50
Calculate the following:
(i) Accuracy (ii) Precision (iii) Recall (iv) F1 Score

Given:
TP = 560
TN = 330
FP = 60
FN = 50

(i) Accuracy

Accuracy = (TP + TN) / (TP + TN + FP + FN)

= (560 + 330) / (560 + 330 + 60 + 50)

= 890 / 1000

= 0.89 (89%)

(ii) Precision

Precision = TP / (TP + FP)

= 560 / (560 + 60)

= 560 / 620

= 0.9032 (≈ 90.32%)

(iii) Recall

Recall = TP / (TP + FN)

= 560 / (560 + 50)

= 560 / 610

= 0.9180 (≈ 91.80%)

(iv) F1 Score

F1 Score = 2 × (Precision × Recall) / (Precision + Recall)

= 2 × (0.9032 × 0.9180) / (0.9032 + 0.9180)

= 2 × (0.8290) / 1.8212

= 0.910 (≈ 91.0%)

Final Results:

Accuracy = 89%
Precision = 90.32%
Recall = 91.80%
F1 Score = 91.0%

4 (c) What is activation function in Deep Neural Network? What is the usability of this?

Activation Function in Deep Neural Network

An activation function is a mathematical function used in a Deep Neural Network (DNN) to determine whether a neuron should be activated or not. It takes the input signal from a neuron and converts it into an output signal that is passed to the next layer of the network.

Activation functions introduce non-linearity into the neural network, which allows the model to learn complex patterns from data.

Usability of Activation Function

  • Introduces Non-Linearity: It enables neural networks to learn complex relationships between input and output.
  • Controls Output: It determines whether a neuron should be activated and how strongly it should pass information to the next layer.
  • Improves Learning Ability: It helps the neural network learn complicated patterns in large datasets.
  • Supports Deep Learning: Without activation functions, deep neural networks would behave like simple linear models.

Deep Neural Network-এ Activation Function

Activation function হলো একটি mathematical function যা Deep Neural Network (DNN)-এ ব্যবহার করা হয় একটি neuron সক্রিয় হবে কিনা তা নির্ধারণ করার জন্য। এটি neuron-এর input signal গ্রহণ করে এবং সেটিকে একটি output signal-এ রূপান্তর করে যা পরবর্তী layer-এ পাঠানো হয়।

Activation function neural network-এ non-linearity যুক্ত করে, যার ফলে model জটিল pattern শিখতে পারে।

Activation Function-এর ব্যবহার

  • Non-Linearity প্রদান করে: এটি neural network-কে জটিল input-output সম্পর্ক শিখতে সাহায্য করে।
  • Output নিয়ন্ত্রণ করে: কোন neuron সক্রিয় হবে এবং কতটা signal পরবর্তী layer-এ যাবে তা নির্ধারণ করে।
  • Learning ক্ষমতা বাড়ায়: বড় dataset থেকে জটিল pattern শেখার ক্ষমতা বৃদ্ধি করে।
  • Deep Learning সম্ভব করে: Activation function না থাকলে deep neural network শুধুমাত্র একটি linear model-এর মতো আচরণ করত।
5. (a) A network has been assigned to the IP address 200.1.2.0/24 It has 3 subnets.
Determine the following for each subnet:
(i) Total number of IP addresses
(ii) Range of usable IP addresses
(iii) Network address
(iv) Direct broadcast address
(v) Limited broadcast address.

Given: Network = 200.1.2.0/24, required subnets = 3

Step 1: Find new subnet mask
To create at least 3 subnets from a /24 network, we borrow 2 bits from the host part.
New subnet mask = /26
This gives 22 = 4 subnets, which is enough for 3 subnets.

Step 2: Addresses per subnet
A /26 subnet has 32 – 26 = 6 host bits.
So, total IP addresses per subnet = 26 = 64
Usable IP addresses per subnet = 64 – 2 = 62

Subnet details

5.(b) Draw the diagram of TCP/IP protocol suite and mention the name of protocols used in different layers of TCP/IP.

5.(c) Compare circuit switching and packet switching.

Comparison Between Circuit Switching and Packet Switching

  • Connection Type: In Circuit Switching, a dedicated communication path is established between sender and receiver before data transmission. In Packet Switching, data is divided into packets and sent independently without a dedicated path.
  • Resource Usage: Circuit switching reserves the entire channel for the whole communication session, while packet switching shares network resources among multiple users.
  • Transmission Method: Circuit switching sends data as a continuous stream, whereas packet switching sends data in small packets.
  • Efficiency: Circuit switching is less efficient because the channel remains reserved even when no data is being transmitted. Packet switching is more efficient because bandwidth is used only when packets are sent.
  • Example: Circuit switching is used in traditional telephone networks, while packet switching is used in the Internet.

Circuit Switching এবং Packet Switching-এর তুলনা

  • Connection Type: Circuit Switching-এ data transmission-এর আগে sender এবং receiver-এর মধ্যে একটি dedicated path তৈরি করা হয়। কিন্তু Packet Switching-এ data ছোট ছোট packet-এ ভাগ করে পাঠানো হয় এবং কোনো নির্দিষ্ট path দরকার হয় না।
  • Resource Usage: Circuit switching-এ পুরো communication সময় channel reserve থাকে। Packet switching-এ একই network resource একাধিক user ব্যবহার করতে পারে।
  • Transmission Method: Circuit switching-এ data continuous stream আকারে পাঠানো হয়, আর packet switching-এ data ছোট ছোট packet আকারে পাঠানো হয়।
  • Efficiency: Circuit switching তুলনামূলকভাবে কম efficient কারণ channel সব সময় reserved থাকে। Packet switching বেশি efficient কারণ data পাঠানোর সময়ই bandwidth ব্যবহার হয়।
  • Example: Circuit switching traditional telephone network-এ ব্যবহৃত হয় এবং packet switching Internet-এ ব্যবহৃত হয়।

6. (a) Consider a computer system with the following specifications: 2+2=4 Physical memory (RAM): 4 GB, Page size: 4 KB, Virtual address space: 32 bit Page table entry size: 8 bytes, Answer the following:

6(a)(i) How many pages are there in the virtual address space? Explain your answer

Number of pages in the virtual address space

Virtual address space for a 32-bit system: 232 bytes

Page size: 4 KB = 212 bytes

Number of pages = Virtual address space / Page size

= 232 / 212

= 220

= 1,048,576 pages

6. (a) (ii) What is the size of the page table? Explain your answer

Size of the page table

Number of pages = 220
Page table entry size = 8 bytes = 23 bytes

Page table size:

= Number of pages × Size of each entry

= 220 × 23

= 223 bytes

= 8 MB

You must subscribe & Login to view more.

Don’t have an account? Register

Or your subscription is under review by admin. Please message on WhatsApp / Telegram.

Leave a Comment

Latest Post
Field Based Job Question & Solution
Bank IT Job Solution

MCQ + Written from Bangladesh Bank, Sonali, Combined Bank IT recruitment.

BPSC IT Job Solution

BPSC Computer/IT cadre & non-cadre post Question papers with full solutions.

Gas Field IT Job Solution

Gas field like TGTDCL, BGDCL, JGTDSL, KGDCL, SGCL, RPGCL, GTCL etc. question solution

Power Sector IT Job Solution

Power sector such as NESCO, DESCO, DPDC, WZPDCL, BPDB, PGCB, BREB etc

Other IT Job Solution

Other Govt. Semi govt. organization like BCC, BTCL, CAAB, NSI etc.

NTRCA IT Job Solution (upcoming)

NTRCA ICT-related posts such as Assistant Teacher, Demonstrator, Lecturer.

IT MCQ Job Solution

Collected MCQ Job solution of BANK, BPSC, POWER SECTOR, GAS Field and Others.

Topic Based Q&S
WhatsApp Telegram Messenger