Text
CS 473: Assignment 3 Topics: XSS, CSRF, SQL Injection Attacks
Task 1: Cross-Site Scripting (XSS) (60) Complete the whole https://xss-game.appspot.com/ XSS game. There are a total of six short levels. Complete all of them. After completion of each level, you have to document the following: 1. A screenshot of the ‘Level completion’ page. 2. A brief description of your thought process and how you carried out the attack, providing all inputs. Note: If no…
0 notes
Text
CS 473/CS 571/EE483 Assignment 2: Software Security
Task 1: Dynamic Analysis [5 points] In this part, you have been contacted by the National Cyber Security Division of Pakistan, they need your expertise for a matter of utmost attention. Recently, a twitter account has surfaced which is propagating hate against Pakistan by statements like this: Fortunately, you have gotten access to the program running this account, which is an executable binary…
0 notes
Text
Intro: Artificial Intelligence (CS331) Assignment - 3
Written Part [25] The given table displays different conditions on the basis of which Zafir decides whether he will go to a restaurant for dinner or not. Perform the ID3 algorithm to generate the decision tree which corresponds to the table. Budget Hungry? Restaurant Reviews Goes to restaurant low no bad no high yes bad no medium no good no low no good no low yes bad yes high yes good yes medium…
0 notes
Text
CS-331 Introduction to Artificial Intelligence Assignment 1
Part 1 (theory): Question 1: [25 marks, 5 marks each] The search algorithms you have learnt in CS-331 can be used to traverse the graph shown in Fig 1.1. As you may already know, traversal from each algorithm will result into a different tree. Figure 1.1 was traversed using 7 different search algorithms, and the corresponding tree (R1 to R7) for each algorithm has been given below. In each of the…
0 notes
Text
CS-310 Assignment 4
Problem 1. (Points: 10) Suppose a job ji is given by two numbers di and pi , where di is the deadline and pi is the penalty. The length of each job is equal to 1 minute. All n such jobs are to be scheduled, but only one job can run at any given time. If job ji does not complete before its deadline di , its penalty pi should be paid. Design a greedy algorithm to find a schedule which minimizes the…
0 notes
Text
CS-310 Assignment 3
Problem 1. (Points: 15) Suppose you are choosing between the following 3 algorithms: • Algorithm A solves the problem of size n by dividing it into 8 subproblems of size n/4, recursively solving each subproblem, and then combining the solutions in linear time. • Algorithm B solves the problem of size n by recursively solving two subproblems of size n − 1 and then combining the solutions in…
0 notes
Text
CS-310 Assignment 2
Problem 1. (20 points) Suppose that you have been hired by the CS Department to prepare the course offering schedule of CS courses for the next 5 years. You are given the following scheduling constraints: 1. All CS courses are offered in regular semester only, i.e., in Fall semester or in Spring semester. No CS course is offered in the summer semester. 2. Due to shortage of faculty, same course…
0 notes
Text
CS-310 Assignment 1
Problem 1. (10 points) Gale and Shapely published their paper on the Stable Matching Problem in 1962; but a version of their algorithm had already been in use for ten years by the National Resident Matching Program, for the problem of assigning medical residents to hospitals. Basically, the situation wa the following. There were m hospitals, each with a certain number of available positions for…
0 notes
Text
CS 300: Advanced Programming Assignment 3 Sequence Board Game
In this assignment you are required to implement a single multiplayer game of Sequence for four players (2 in each team). Player 1 and 3 will be team 1 and player 2 and 4 will be team 2 by default. You are not required to support multiple parallel games or to support a second game after the first one finishes or to support disconnecting players. You can read more about the game here. However, for…
0 notes
Text
CS300-Advanced Programming Assignment 2
Task(s): Question 1: For this task, you are required to take the name of the file as input from the user and then read it (marks will be deducted if you don’t take the name of the file as input). (20 marks) • The txt file contains push & pop operations. You need to read the file line by line and identify the given data structures i.e., Stack, Queue, Priority Queue (min & max) or you can…
0 notes
Text
Programming Assignment - 4 CS-200
Question 1 [50]: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list “parts”. The length of each part should be as equal as possible: no two parts should have a size differing by more than 1. This may lead to some parts being null. The parts should be in the order of occurrence in the input list, and parts occurring earlier…
0 notes
Text
Programming Assignment – 3 CS200 - Introduction to Programming
Question 1 [50]: Board-Game scenario: Consider a board game (Board: 2D Dynamic Array/ 2D Vector (m x n)). The player starts the game at the top left corner of the board. While he ends the game at the bottom right corner. The board elements are either marked with 0 or 1. During the game, if any cell of the board is marked with zero, the player can’t go to that cell. The player can only move to the…
0 notes
Text
Programming Assignment - 2 CS200 - Introduction to Programming
Question 1: Operator Overloading [75] In this question, you will have to implement fractions as a class and perform operations on them using operator overloading. Create a class Fractions with private member variables [2] ● int numerator ● int denominator Implement the following: ● Default constructor (choose the fraction appropriately) [3] ● Parameterized constructor [5] Fractions(int n, int d)…
0 notes
Text
Programming Assignment 1 CS200
Question 1 [25]: A. Write a swap () function that only takes pointers to two integer variables as parameters and swaps the values in those variables using the pointers without creating any extra variables. The swapped values are displayed fromthe main(). [5] B. Write a program that will take a char array as an input, and it reverses the positionsof the char elements in the array. You are not…
0 notes
Text
AI 3603 Artificial Intelligence: Homework 3: Segmentation
1 Introduction 1.1 Description In this homework, you will finetune the SAM model to segment the tumor area fromthe MRI images of brasins. As shown in Fig.1, there are many MRI images of brain and their masks of tumor as groundtruth. Segment Anything Model (SAM) is a large model that can be used for image segmentation. But in this task, we need to fine-tune the model in specific areas of…
0 notes
Text
AI 3603 Artificial Intelligence: Principles and Techniques Homework 2
1 Reinforcement Learning in Cliff-walking Environment [50 pts] In this assignment, you will implement Reinforcement Learning agents to find a safe path to the goal in a grid-shaped maze. The agent will learn by trail and error from interactions with the environment and finally acquire a policy to get as high as possible scores in the game. 1.1 Game Description Suppose a 12×4 grid-shaped maze in…
0 notes
Text
AI 3603 Artificial Intelligence: Principles and Techniques Homework 1: Search Algorithm
1 Introduction 1.1 Description In this homework, you will develop a path-planning framework for a service robot in a room using A* algorithm. The task scenario is shown in Fig. 1. The 2D global map is given. You are required to design and implement the path planning algorithm according to the following task requirements. Figure 1: Path planning of a service robot. 1.2 Provided File List The…
0 notes