Teletalk Bangladesh Ltd.
Post: Assistant Manager (IT)
Exam Date: 2023
Question not fully collected
Knight and Knave Problem
The Knight and Knave problem is a famous logical puzzle where inhabitants of an island are either Knights or Knaves. A Knight always tells the truth, while a Knave always tells a lie. The goal of the problem is to determine who is a Knight and who is a Knave based on the statements they make.
Example: Suppose two people, A and B, are on the island. A says, “B is a Knave.” To solve the puzzle, we assume A is a Knight and check if the statement is true. Then we assume A is a Knave and check again. By logical reasoning, we determine the correct identity of each person.
This problem is used in Artificial Intelligence and logic to test reasoning and truth-value analysis.
Knight and Knave Problem
Knight এবং Knave problem হলো একটি বিখ্যাত যুক্তিভিত্তিক ধাঁধা, যেখানে একটি দ্বীপের বাসিন্দারা হয় Knight নয়তো Knave। Knight সবসময় সত্য কথা বলে এবং Knave সবসময় মিথ্যা কথা বলে। তাদের বক্তব্য বিশ্লেষণ করে কে Knight এবং কে Knave তা নির্ধারণ করাই এই সমস্যার উদ্দেশ্য।
উদাহরণ: ধরুন দুইজন ব্যক্তি A এবং B আছে। A বলে, “B একজন Knave।” এখন আমরা ধরে নেই A একজন Knight এবং যাচাই করি বক্তব্যটি সত্য কিনা। আবার ধরে নেই A একজন Knave এবং পুনরায় বিশ্লেষণ করি। যুক্তির মাধ্যমে সঠিক পরিচয় নির্ধারণ করা যায়।
এই সমস্যা Artificial Intelligence ও Logic-এ reasoning দক্ষতা পরীক্ষার জন্য ব্যবহৃত হয়।
MAC Flooding
MAC flooding is a network attack in which an attacker sends a large number of fake MAC addresses to a switch. The switch stores these fake addresses in its MAC address table until the table becomes full.
When the MAC table is full, the switch starts behaving like a hub and broadcasts all incoming traffic to all ports. As a result, the attacker can capture sensitive network data.
How to Prevent MAC Flooding
Port Security: Configure switches to limit the number of MAC addresses allowed on each port.
Static MAC Binding: Manually assign specific MAC addresses to switch ports.
Enable VLAN Segmentation: Divide the network into VLANs to limit broadcast domains.
Use Network Monitoring Tools: Detect abnormal traffic and suspicious behavior early.
MAC Flooding
MAC flooding হলো একটি network attack যেখানে attacker বিপুল সংখ্যক ভুয়া MAC address switch-এ পাঠায়। Switch তার MAC address table-এ এই ভুয়া address সংরক্ষণ করতে থাকে যতক্ষণ না table পূর্ণ হয়ে যায়।
MAC table পূর্ণ হয়ে গেলে switch hub-এর মতো আচরণ করে এবং সব data সব port-এ broadcast করতে শুরু করে। ফলে attacker সহজেই sensitive data সংগ্রহ করতে পারে।
MAC Flooding প্রতিরোধের উপায়
Port Security: প্রতিটি port-এ নির্দিষ্ট সংখ্যক MAC address সীমাবদ্ধ করা।
Static MAC Binding: নির্দিষ্ট MAC address নির্দিষ্ট port-এর সাথে যুক্ত করা।
VLAN Segmentation: Network-কে VLAN-এ ভাগ করে broadcast domain কমানো।
Network Monitoring: অস্বাভাবিক traffic শনাক্ত করার জন্য monitoring tool ব্যবহার করা।


#include <stdio.h> int recursiveBinarySearch(int array[], int start_index, int end_index, int element) { // Base case: If the element is not present in the array if (end_index >= start_index) { int middle = start_index + (end_index - start_index) / 2; // Check if the element is present at the middle if (array[middle] == element) return middle; // Return the index of the element // If the element is smaller than middle, search the left subarray if (array[middle] > element) return recursiveBinarySearch(array, start_index, middle - 1, element); // If the element is greater than middle, search the right subarray return recursiveBinarySearch(array, middle + 1, end_index, element); } // Element is not found in the array return -1; } int main(void) { int array[] = {1, 4, 7, 9, 16, 56, 70}; // Array should be sorted for binary search int n = 7; // Size of the array int element = 9; // Element to be searched // Call recursive binary search function int found_index = recursiveBinarySearch(array, 0, n - 1, element); // Check if element is found or not if (found_index == -1) { printf("Element not found in the array.\n"); } else { printf("Element found at index: %d\n", found_index); } return 0; }
RSA Algorithm
RSA (Rivest–Shamir–Adleman) is an asymmetric key cryptographic algorithm used for secure data transmission. It uses two keys: a public key for encryption and a private key for decryption.
How RSA Works
Step 1: Key Generation
Choose two large prime numbers p and q. Compute n = p × q. Then compute φ(n) = (p−1)(q−1). Select a public key e such that 1 < e < φ(n) and e is coprime with φ(n). Finally, calculate the private key d such that (d × e) mod φ(n) = 1.
Step 2: Encryption
The sender encrypts the message M using the public key (e, n): C = Me mod n.
Step 3: Decryption
The receiver decrypts the ciphertext C using the private key (d, n): M = Cd mod n.
RSA security is based on the difficulty of factoring large prime numbers.
RSA Algorithm
RSA (Rivest–Shamir–Adleman) হলো একটি asymmetric key cryptographic algorithm যা নিরাপদ data আদান-প্রদানের জন্য ব্যবহৃত হয়। এতে দুটি key ব্যবহৃত হয়: public key (encryption-এর জন্য) এবং private key (decryption-এর জন্য)।
RSA কীভাবে কাজ করে
ধাপ ১: Key Generation
দুটি বড় prime সংখ্যা p এবং q নির্বাচন করা হয়। তারপর n = p × q নির্ণয় করা হয়। এরপর φ(n) = (p−1)(q−1) হিসাব করা হয়। এমন একটি public key e নির্বাচন করা হয় যা 1 < e < φ(n) এবং φ(n)-এর সাথে coprime। শেষে private key d নির্ণয় করা হয় যাতে (d × e) mod φ(n) = 1 হয়।
ধাপ ২: Encryption
Sender public key (e, n) ব্যবহার করে message M encrypt করে: C = Me mod n।
ধাপ ৩: Decryption
Receiver private key (d, n) ব্যবহার করে ciphertext C decrypt করে: M = Cd mod n।
RSA-এর নিরাপত্তা বড় prime সংখ্যা factor করা কঠিন হওয়ার উপর নির্ভর করে।
| Process | Arrival Time | Execute Time |
|---|---|---|
| P0 | 0 | 5 |
| P1 | 1 | 3 |
| P2 | 2 | 8 |
| P3 | 3 | 6 |
FCFS

Round Robin with Quantam 3:

Primary Key, Candidate Key and Foreign Key
Primary Key
A Primary Key is a column (or set of columns) that uniquely identifies each record in a table. It cannot contain duplicate values or NULL values.
Example: In a Student table, Student_ID is a Primary Key because each student has a unique ID.
Candidate Key
A Candidate Key is any column (or set of columns) that can uniquely identify a record in a table. A table may have multiple candidate keys, but only one is selected as the Primary Key.
Example: In a Student table, both Student_ID and Email can uniquely identify students. Both are Candidate Keys, but one is chosen as the Primary Key.
Foreign Key
A Foreign Key is a column in one table that refers to the Primary Key of another table. It is used to create a relationship between two tables.
Example: In an Enrollment table, Student_ID is a Foreign Key that refers to Student_ID in the Student table.
Primary Key, Candidate Key এবং Foreign Key
Primary Key
Primary Key হলো একটি column (বা একাধিক column) যা একটি table-এর প্রতিটি record-কে uniquely শনাক্ত করে। এতে duplicate বা NULL value থাকতে পারে না।
উদাহরণ: Student table-এ Student_ID Primary Key, কারণ এটি প্রতিটি ছাত্রকে আলাদাভাবে চিহ্নিত করে।
Candidate Key
Candidate Key হলো এমন column (বা column-এর সমষ্টি) যা একটি record-কে uniquely শনাক্ত করতে পারে। একটি table-এ একাধিক Candidate Key থাকতে পারে, তবে তাদের মধ্যে একটি Primary Key হিসেবে নির্বাচন করা হয়।
উদাহরণ: Student table-এ Student_ID এবং Email উভয়ই Candidate Key হতে পারে, কারণ উভয়ই unique।
Foreign Key
Foreign Key হলো একটি table-এর column যা অন্য table-এর Primary Key-কে নির্দেশ করে। এটি দুইটি table-এর মধ্যে সম্পর্ক স্থাপন করে।
উদাহরণ: Enrollment table-এ Student_ID হলো Foreign Key, যা Student table-এর Student_ID-কে নির্দেশ করে।
Incomplete Question
