using namespace std;
int main() cfw_
int q = cfw_1, r, c = 0, solution = 0;
if (c = 8)
r = -1;
if (r = 8)
for (int i = 0; i < c; +i)
/ row test
if (q[r][i] = 1)
using namespace std;
input: cout < "Please input a string of uppercase characters indicating the
outcome of a race!
cin > s;
cout < endl;
for(int i = 0; i< s.length(); i
CS 313 Data Structures
Student Class and Driver
This project is designed to help you get ready to write data structure programs for this semester. This
Student Class will be the data that will be used for each of the projects assigned and
Project #1: Registration Program
Write a (Java) program that will maintain the registration of a (very small, for this project) college, using
the Student, Course, and Sorted Array classes that you have already written.
CSCI 343/744 WINTER 2016 PROBLEM SET 5
Consider the following code:
R2 R2 BNE R2, 0,
V0 A0 +
R1 R1 +
4 (branch on not equal)
Assume that we are using non-MIPS pipeline and register R2 is initialized t
CSCI 343/744 WINTER 2016 PROBLEM SET 3
Three processors P1, P2, P3 with their individual caches are connected via a bus with a shared memory implementing MESI
protocol. In the initial state memory location x has the value 3 and the caches are empty.
CSCI 343/744 WINTER 2016 PROBLEM SET 1
Q1. Consider following RTL executable, loaded into main memory, with offset 0004 (decimal value)
Program Counter in the executable
R2 R1 + R1
R1 R1 + 2
PROBLEM SAMPLE 2
Q5 (18 points)
N customers enter the bakery to buy cookies. Each customer gets its turn[i], by computing a next
number, and waits to be served. The clerk uses a counter to keep track of the served customers.
The clerk serves the customer
Fork (): System call fork () is used to create new processes. It takes no arguments and returns a
process ID. The newly created process is called child, the calling process is called parent. After a
new child is newly created
CS340 Homework 1
Part A: What is MS Windows and UNIX operating system?
MS Windows is the most popular operating system used in the world. MS-DOS is the
earliest consumer operating system that first caught peoples attention. The major
Assume that we have a demand-paged memory. The page table is held in registers. It
takes 8 milliseconds to service a page fault if an empty frame is available or if the
replaced page is not modified, and 20 milliseconds if the replaced page modified.
CS 340 HW 4
-[xuel1161@venus ~]$ ls -l >dirlist&
[xuel1161@venus ~]$ fg 1
fg: No such job.
ls -color=auto -l > dirlist
It shows job number  of the process (pid33168) that is not running in the foreground
Root Directory (/)
The root directory is the top of the file system. It is the master cabinet that contains all folders and files.
1. Get a listing of your root directory. ( use, cd and ls Cl)
[xuel1161@venus ~]$ cd /
[xuel1161@venus /]$ ls -l
Q1: Which one of the following crossover method could shorten chromosome length?
A: One point
B: Two point
E: N point
Correct answer: D, cut and splice doesnt require to be the same size and could be at any
1: What is the difference between phenotype level and genotype level in random number
A: Phenotype level gives more randomness.
B: Genotype level gives more randomness.
C: Phenotype generates a bit-string of lengt
1: Which one of the following sorting algorithm gives O(n) time complexity?
A: Quick Sort
B: Merge Sort
C: Heap Sort
D: Radix Sort
E: Shell sort
Correct answer: D - Radix sort. Radix sort can be O(n) sorting algorithm when k is consid
1: What is an adaptive operator?
A: Its an operation that drives variables to adapt to current fitness parameters.
pick initial population size
termination criteria: number of generations to terminate
set fitness threshold, a place to stop
bread the next generation by ramdomly select par
NAME OF PAPER: An Efficient Method Based On Genetic Algorithms to Solve Sensor
Network Optimization Problem
AUTHOR(S) OF PAPER: Ehsan Heidari and Ali Movaghar
YEAR OF PAPER: March 2011
TYPE OF PUBLICATION: Journal
(such as journal, conference proceedings,
1: Whats the difference between set packing problem verse partition problems?
A: Set packing takes exponential time to solve where partition takes polynomial time.
B: partition takes exponential time to solve where set packing takes polynom
This page lists the most important materials likely to be involved in final
exam questions, along with some tips. They should help your preparations,
but only studying from these notes does not guarantee you will pass the