INSTRUCTIONS• The homework will be peer-graded. In analytics modeling, there are often lots of different approaches that work well, and I want you to see not just your own, but also others. • The homework grading scale reflects the fact that the primary purpose of homework is learning:Rating Meaning Point value (out of 100) 4 All correct (perhaps except a few details) with a deeper solution than expected 100 3 Most or all correct 90 2 Not correct, but a reasonable attempt 75 1 Not correct, insufficient effort 50 0 Not submitted 0Question 13.2Use the Arena software (PC users) or Python with SimPy (PC or Mac users) to build a simulation of the system, and then vary the number of ID/boarding-pass checkers and personal-check queues to determine how many are needed to keep average wait times below 15 minutes. [If you’re using SimPy, or if you have access to a non-student version of Arena, you can use λ1 = 50 to simulate a busier airport.]Question 14.1The breast cancer data set breast-cancer-wisconsin.data.txt from http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/ (description at http://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+%28Original%29 ) has missing values. 1. Use the mean/mode imputation method to impute values for the missing data. 2. Use regression to impute values for the missing data. 3. Use regression with perturbation to impute values for the missing data. 4. (Optional) Compare the results and quality of classification models (e.g., SVM, KNN) build using (1) the data sets from questions 1,2,3; (2) the data that remains after data points with missing values are removed; and (3) the data set when a binary variable is introduced to indicate missing values.Question 15.1Describe a situation or problem from your job, everyday life, current events, etc., for which optimization would be appropriate. What data would you need?
INSTRUCTIONS• The homework will be peer-graded. In analytics modeling, there are often lots of different approaches that work well, and I want you to see not just your own, but also others. • The homework grading scale reflects the fact that the primary purpose of homework is learning:Rating Meaning Point value (out of 100) 4 All correct (perhaps except a few details) with a deeper solution than expected 100 3 Most or all correct 90 2 Not correct, but a reasonable attempt 75 1 Not correct, insufficient effort 50 0 Not submitted 0Question 11.1Using the crime data set uscrime.txt from Questions 8.2, 9.1, and 10.1, build a regression model using: 1. Stepwise regression 2. Lasso 3. Elastic net For Parts 2 and 3, remember to scale the data first – otherwise, the regression coefficients will be on different scales and the constraint won’t have the desired effect.For Parts 2 and 3, use the glmnet function in R.Notes on R: • For the elastic net model, what we called λ in the videos, glmnet calls “alpha”; you can get a range of results by varying alpha from 1 (lasso) to 0 (ridge regression) [and, of course, other values of alpha in between]. • In a function call like glmnet(x,y,family=”mgaussian”,alpha=1) the predictors x need to be in R’s matrix format, rather than data frame format. You can convert a data frame to a matrix using as.matrix – for example, x
INSTRUCTIONS• The homework will be peer-graded. In analytics modeling, there are often lots of different approaches that work well, and I want you to see not just your own, but also others. • The homework grading scale reflects the fact that the primary purpose of homework is learning:Rating Meaning Point value (out of 100) 4 All correct (perhaps except a few details) with a deeper solution than expected 100 3 Most or all correct 90 2 Not correct, but a reasonable attempt 75 1 Not correct, insufficient effort 50 0 Not submitted 0Question 7.1Describe a situation or problem from your job, everyday life, current events, etc., for which exponential smoothing would be appropriate. What data would you need? Would you expect the value of α (the first smoothing parameter) to be closer to 0 or 1, and why?Question 7.2Note: in R, you can use either HoltWinters (simpler to use) or the smooth package’s es function (harder to use, but more general). If you use es, the Holt-Winters model uses model=”AAM” in the function call (the first and second constants are used “A”dditively, and the third (seasonality) is used “M”ultiplicatively; the documentation doesn’t make that clear).Question 8.1Describe a situation or problem from your job, everyday life, current events, etc., for which a linear regression model would be appropriate. List some (up to 5) predictors that you might use.Using crime data from http://www.statsci.org/data/general/uscrime.txt (file uscrime.txt, description at http://www.statsci.org/data/general/uscrime.html ), use regression (a useful R function is lm or glm) to predict the observed crime rate in a city with the following data:M = 14.0 So = 0 Ed = 10.0 Po1 = 12.0 Po2 = 15.5 LF = 0.640 M.F = 94.0 Pop = 150 NW = 1.1 U1 = 0.120 U2 = 3.6 Wealth = 3200 Ineq = 20.1 Prob = 0.04 Time = 39.0Show your model (factors used and their coefficients), the software output, and the quality of fit.Note that because there are only 47 data points and 15 predictors, you’ll probably notice some overfitting. We’ll see ways of dealing with this sort of problem later in the course.
INSTRUCTIONS• The homework will be peer-graded. In analytics modeling, there are often lots of different approaches that work well, and I want you to see not just your own, but also others. • The homework grading scale reflects the fact that the primary purpose of homework is learning:Rating Meaning Point value (out of 100) 4 All correct (perhaps except a few details) with a deeper solution than expected 100 3 Most or all correct 90 2 Not correct, but a reasonable attempt 75 1 Not correct, insufficient effort 50 0 Not submitted 0Question 4.1Describe a situation or problem from your job, everyday life, current events, etc., for which a clustering model would be appropriate. List some (up to 5) predictors that you might use.Question 4.2The iris data set iris.txt contains 150 data points, each with four predictor variables and one categorical response. The predictors are the width and length of the sepal and petal of flowers and the response is the type of flower. The data is available from the R library datasets and can be accessed with iris once the library is loaded. It is also available at the UCI Machine Learning Repository (https://archive.ics.uci.edu/ml/datasets/Iris ). The response values are only given to see how well a specific method performed and should not be used to build the model.Use the R function kmeans to cluster the points as well as possible. Report the best combination of predictors, your suggested value of k, and how well your best clustering predicts flower type.Question 5.1Using crime data from the file uscrime.txt (http://www.statsci.org/data/general/uscrime.txt, description at http://www.statsci.org/data/general/uscrime.html), test to see whether there are any outliers in the last column (number of crimes per 100,000 people). Use the grubbs.test function in the outliers package in R.Describe a situation or problem from your job, everyday life, current events, etc., for which a Change Detection model would be appropriate. Applying the CUSUM technique, how would you choose the critical value and the threshold?Question 6.22. Use a CUSUM approach to make a judgment of whether Atlanta’s summer climate has gotten warmer in that time (and if so, when).
WEEK 1 HOMEWORKINSTRUCTIONS• The homework will be peer-graded. In analytics modeling, there are often lots of different approaches that work well, and I want you to see not just your own, but also others. • The homework grading scale reflects the fact that the primary purpose of homework is learning:Rating Meaning Point value (out of 100) 4 All correct (perhaps except a few details) with a deeper solution than expected 100 3 Most or all correct 90 2 Not correct, but a reasonable attempt 75 1 Not correct, insufficient effort 50 0 Not submitted 0Question 2.1Describe a situation or problem from your job, everyday life, current events, etc., for which a classification model would be appropriate. List some (up to 5) predictors that you might use.Question 2.2The files credit_card_data.txt (without headers) and credit_card_data-headers.txt (with headers) contain a dataset with 654 data points, 6 continuous and 4 binary predictor variables. It has anonymized credit card applications with a binary response variable (last column) indicating if the application was positive or negative. The dataset is the “Credit Approval Data Set” from the UCI Machine Learning Repository (https://archive.ics.uci.edu/ml/datasets/Credit+Approval) without the categorical variables and without data points that have missing values.1. Using the support vector machine function ksvm contained in the R package kernlab, find a good classifier for this data. Show the equation of your classifier, and how well it classifies the data points in the full data set. (Don’t worry about test/validation data yet; we’ll cover that topic soon.)Notes on ksvm • You can use scaled=TRUE to get ksvm to scale the data as part of calculating a classifier.• The term λ we used in the SVM lesson to trade off the two components of correctness and margin is called C in ksvm. One of the challenges of this homework is to find a value of C that works well; for many values of C, almost all predictions will be “yes” or almost all predictions will be “no”. • ksvm does not directly return the coefficients a0 and a1…am. Instead, you need to do the last step of the calculation yourself. Here’s an example of the steps to take (assuming your data is stored in a matrix called data):# call ksvm. Vanilladot is a simple linear kernel. model
Course ProjectThis project should be done individually.The web sites https://www.sas.com/en_us/customers.html, https://www.ibm.com/casestudies/search?search, and https://www.informs.org/Impact/O.R.-Analytics-Success-Stories (among others) contain brief overviews of some major Analytics success stories. In this course project, your job is to think carefully about what analytics models and data might have been required.(1) Browse the short overviews of the projects. Read a bunch of them – they’re really interesting. But don’t try to read them all unless you have a lot of spare time; there are lots!(2) Pick a project for which you think at least three different Analytics models might have been combined to create the solution.(3) Think carefully and critically about what models might be used to create the solution, how they would be combined, what specific data might be needed to use the models, how it might be collected, and how often it might need to be refreshed and the models re-run. DO NOT find a description online (or elsewhere) of what the company or organization actually did. I want this project to be about your ideas, not about reading what someone else did.(4) Write a short report describing your answers to (3).
Background: A PKA task is provided for this lab where a network address is given along with some host requirements for different networks. You need to apply VLSM and find out the network addresses for all the networks present in the topology. Based on these network addresses, you have to assign IP configuration to the devices. Steps: 1. Write your ID, section, and name beside PC1 in the given format. ID_Section_Full Name. Failing to do so even by mistake will result in a 0 in the entire assessment.2. You are given the network address 1.17.0.0/16. Now you have to use VLSM to subnet this network address according to the following necessity. (All the requirements are including default gateway) a. LAN connected to Switch1 has 2046 devices in total. b. LAN connected to Switch2 has 4000 devices in total. c. LAN connected to Switch3 has 1024 devices in total. d. LAN connected to Switch4 has 1000 devices in total. e. LAN connected to Switch5 has 750 devices in total. There are some Switch network and WAN networks too in the topology. You need to find out the network addresses for those networks too. As all the WANs have the same requirements, allocate the network addresses based on the location and start allocating from left to right. 3. As you have the network addresses, now you need to assign the IP addresses, and subnet masks to the devices present in the topology. For PCs and Servers, you have to set the default gateway too. Now, if the network address is 1.1.0.0/24, you should start assigning from 1.1.0.1/24, 1.1.0.2/24 and so on. a. For LAN networks, start assigning in this sequence, the default gateway of the network, then PCs, and then Servers. If there are multiple PCs/Servers, allocate the lower address to the PC or Server that has the lower number. Like PC10’s address should be less than PC11’s address. b. For Switch/WAN networks, assign IP addresses based on the interface’s location, and start allocating from left to right. Sanity Checking: 1. Successfully setting IP configuration for all the devices of Switch1 LAN will increase the percentage to 10%. 2. Successfully setting IP configuration for all the devices of Switch2 LAN will increase the percentage to 32%. 3. Successfully setting IP configuration for all the devices of Switch3 LAN will increase the percentage to 42%. 4. Successfully setting IP configuration for all the devices of Switch4 LAN will increase the percentage to 53%. 5. Successfully setting IP configuration for all the devices of Switch5 LAN will increase the percentage to 63%. 6. Successfully setting IP configuration for all the devices of the Switch network(s) will increase the percentage to 75%. 7. Successfully setting IP configuration for all the devices of the WAN network(s) will increase the percentage to 100%.
Class Work 1. Create a basic client server program where the server tells the client the client’s IP and device name whenever a client is connected. 2. Create a basic client server program where the server receives a message from the client and counts how many vowels are there in the message. If there are no vowels in the message then the server sends “Not enough vowels” message to the client, if there are at most two vowels then the server sends “Enough vowels I guess” and if there are more than two vowels then the server sends “Too many vowels” to the client. 3. Create a basic multi-threaded client server program where the server receives a message from the client and counts how many vowels are there in the message. If there are no vowels in the message then the server sends “Not enough vowels” message to the client, if there are at most two vowels then the server sends “Enough vowels I guess” and if there are more than two vowels then the server sends “Too many vowels” to the client. Only difference here is that the server will be able to respond to multiple clients simultaneously. Home Work 4. Create a basic client server program where the server takes the number of hours a person worked from the client and calculates the person’s salary. ● If the hours worked is less than or equal to 40, then the person receives Tk 200 per hour. ● If the hours worked is greater than 40, then the person receives Tk 8000 plus Tk 300 for each hour worked over 40 hours. The client will provide how many hours the person worked to the server and the server will calculate the salary and send it to the client.
Class Task: Make a zip file of, 1. edited pdf file with the answers Home Task: Make a zip file of, 1. a doc file containing the screenshots of all 5 layers’ protocols’ headers for a request packet and a response packet, then describe the fields of the headers. (This is for Wireshark) 2. a first.py file containing all the edits that you have made in the file (This is for NS3) 3. a doc file containing the screenshots of the outputs for different data sizes, a throughput vs data size graph, and a little description of the graph. In the graph, plot throughput in the y-axis and data size in the x-axis. (This is for NS3) Naming Format of the zip files: ID_Name_Lab number
Lab 1.5.2: Basic Router Configuration Topology DiagramAddressing Table Device Interface IP Address Subnet Mask Def. Gateway R1 Fa0/0 192.168.1.1 255.255.255.0 N/A S0/0/0 192.168.2.1 255.255.255.0 N/A R2 Fa0/0 192.168.3.1 255.255.255.0 N/A S0/0/0 192.168.2.2 255.255.255.0 N/A PC1 N/A 192.168.1.10 255.255.255.0 192.168.1.1 PC2 N/A 192.168.3.10 255.255.255.0 192.168.3.1Learning Objectives Upon completion of this lab, you will be able to: • Cable a network according to the Topology Diagram. • Erase the startup configuration and reload a router to the default state. • Perform basic configuration tasks on a router. • Configure and activate Ethernet interfaces. • Test and verify configurations. • Reflect upon and document the network implementation. Scenario In this lab activity, you will create a network that is similar to the one shown in the Topology Diagram. Begin by cabling the network as shown in the Topology Diagram. You will then perform the initial router configurations required for connectivity. Use the IP addresses that are provided in the Topology Diagram to apply an addressing scheme to the network devices. When the network configuration is complete, examine the routing tables to verify that the network is operating properly. This lab is a shorter version of Lab 1.5.1: Cabling a Network and Basic Router Configuration and assumes you are proficient in basic cabling and configuration file management. Task 1: Cable the Network. Cable a network that is similar to the one in the Topology Diagram. The output used in this lab is from 1841 routers. You can use any current router in your lab as long as it has the required interfaces as shown in the topology. Be sure to use the appropriate type of Ethernet cable to connect from host to switch, switch to router, and host to router. Refer to Lab 1.5.1: Cabling a Network and Basic Router Configuration if you have any trouble connecting the devices. Be sure to connect the serial DCE cable to router R1 and the serial DTE cable to router R2. Answer the following questions: What type of cable is used to connect the Ethernet interface on a host PC to the Ethernet interface on a switch? ________________________ Copper Straight Through What type of cable is used to connect the Ethernet interface on a switch to the Ethernet interface on a router? __________________________ Copper Straight Through What type of cable is used to connect the Ethernet interface on a router to the Ethernet interface on a host PC? _________________________ Copper Cross-Over Task 2: Erase and Reload the Routers. Step 1: Establish a terminal session to router R1. Refer to Lab 1.5.1, “Cabling a Network and Basic Router Configuration,” for review of terminal emulation and connecting to a router. Step 2: Enter privileged EXEC mode.Router>enable Router# Step 3: Clear the configuration. To clear the configuration, issue the erase startup-config command. Press Enter when prompted to [confirm] that you really do want to erase the configuration currently stored in NVRAM. Router#erase startup-config Erasing the nvram filesystem will remove all files! Continue? [confirm] [OK] Erase of nvram: complete Router# Step 4: Reload configuration. When the prompt returns, issue the reload command. Answer no if asked to save changes. What would happen if you answered yes to the question, “System configuration has been modified. Save?” Answer “yes”: Saves the current configuration, ensuring changes persist after reload._______________________________________________________________________________ Answer “no”: Discards the current configuration changes, reverting to the previous saved configuration on reload._______________________________________________________________________________ The result should look something like this: Router#reloadSystem configuration has been modified. Save? [yes/no]: no Proceed with reload? [confirm]Press Enter when prompted to [confirm] that you really do want to reload the router. After the router finishes the boot process, choose not to use the AutoInstall facility, as shown:Would you like to enter the initial configuration dialog? [yes/no]: no Would you like to terminate autoinstall? [yes]: [Press Return] Press Enter to accept default. Press RETURN to get started!Task 3: Perform Basic Configuration of Router R1. Step 1: Establish a HyperTerminal session to router R1. Step 2: Enter privileged EXEC mode. Router>enable Router# Step 3: Enter global configuration mode. Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#Step 4: Configure the router name as R1. Enter the command hostname R1 at the prompt. Router(config)#hostname R1 R1(config)#Step 5: Disable DNS lookup. Disable DNS lookup with the no ip domain-lookup command. R1(config)#no ip domain-lookup R1(config)#Why would you want to disable DNS lookup in a lab environment? _______________________________________________________________________________ Disabling DNS lookup prevents delays from mistyped commands and simplifies configuration _______________________________________________________________________________ making it easier and faster for users to test and learn. What would happen if you disabled DNS lookup in a production environment? _______________________________________________________________________________ Disabling DNS lookup can disrupt hostname resolution, affecting network management, logging _______________________________________________________________________________ and other services that rely on DNSStep 6: Configure the EXEC mode password. Configure the EXEC mode password using the enable secret password command. Use class for the password. R1(config)#enable secret class R1(config)#Why is it not necessary to use the enable password password command? _______________________________________________________________________________ Enable password does not encrypt the password, but enable secret does encrypt the password. _______________________________________________________________________________ That’s why enable password is not necessary. Step 7: Configure a message-of-the-day banner. Configure a message-of-the-day banner using the banner motd command. R1(config)#banner motd & Enter TEXT message. End with the character ‘&’. ******************************** !!!AUTHORIZED ACCESS ONLY!!! ******************************** & R1(config)#When does this banner display? _______________________________________________________________________________ The Message-of-the-Day (MOTD) banner displays when anyone connects to the router via the console port. Why should every router have a message-of-the-day banner? _______________________________________________________________________________ It acts as a deterrent to unauthorized users by clearly stating that access is restricted to authorized personnel only. Step 8: Configure the console password on the router. Use cisco as the password. When you are finished, exit from line configuration mode. R1(config)#line console 0 R1(config-line)#password cisco R1(config-line)#login R1(config-line)#exit R1(config)#Step 9: Configure the password for the virtual terminal lines. Use cisco as the password. When you are finished, exit from line configuration mode. R1(config)#line vty 0 4 R1(config-line)#password cisco R1(config-line)#login R1(config-line)#exit R1(config)#Step 10: Configure the FastEthernet0/0 interface. Configure the FastEthernet0/0 interface with the IP address 192.168.1.1/24. R1(config)#interface fastethernet 0/0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R1(config-if)#Step 11: Configure the Serial0/0/0 interface. Configure the Serial0/0/0 interface with the IP address 192.168.2.1/24. Set the clock rate to 64000. Note: The purpose of the clock rate command is explained in Chapter 2: Static Routes. R1(config-if)#interface serial 0/0/0 R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1(config-if)#Note: The interface will be activated until the serial interface on R2 is configured and activated Step 12: Return to privileged EXEC mode. Use the end command to return to privileged EXEC mode. R1(config-if)#end R1# Step 13: Save the R1 configuration. Save the R1 configuration using the copy running-config startup-config command. R1#copy running-config startup-config Building configuration… [OK] R1#What is a shorter version of this command? ________________________ R1#write Task 4: Perform Basic Configuration of Router R2. Step 1: For R2, repeat Steps 1 through 9 from Task 3. Step 2: Configure the Serial 0/0/0 interface. Configure the Serial 0/0/0 interface with the IP address 192.168.2.2/24. R2(config)#interface serial 0/0/0 R2(config-if)#ip address 192.168.2.2 255.255.255.0 R2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up R2(config-if)# Step 3: Configure the FastEthernet0/0 interface. Configure the FastEthernet0/0 interface with the IP address 192.168.3.1/24. R2(config-if)#interface fastethernet 0/0 R2(config-if)#ip address 192.168.3.1 255.255.255.0 R2(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R2(config-if)# Step 4: Return to privileged EXEC mode. Use the end command to return to privileged EXEC mode. R2(config-if)#end R2# Step 5: Save the R2 configuration. Save the R2 configuration using the copy running-config startup-config command. R2#copy running-config startup-config Building configuration… [OK] R2# Task 5: Configure IP Addressing on the Host PCs. Step 1: Configure the host PC1. Configure the host PC1 that is attached to R1 with an IP address of 192.168.1.10/24 and a default gateway of 192.168.1.1. Step 2: Configure the host PC2. Configure the host PC2 that is attached to R2 with an IP address of 192.168.3.10/24 and a default gateway of 192.168.3.1. Task 6: Verify and Test the Configurations. Step 1: Verify that routing tables have the following routes using the show ip route command. The show ip route command and output will be thoroughly explored in upcoming chapters. For now, you are interested in seeing that both R1 and R2 have two routes. Both routes are designated with a C. These are the directly connected networks that were activated when you configured the interfaces on each router. If you do not see two routes for each router as shown in the following output, proceed to Step 2. R1#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0 C 192.168.2.0/24 is directly connected, Serial0/0/0————————R2#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static routeGateway of last resort is not setC 192.168.2.0/24 is directly connected, Serial0/0/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0Step 2: Verify interface configurations. Another common problem is router interfaces that are not configured correctly or not activated. Use the show ip interface brief command to quickly verify the configuration of each router’s interfaces. Your output should look similar to the following:R1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.1.1 YES manual up up FastEthernet0/1 unassigned YES unset administratively down down Serial0/0/0 192.168.2.1 YES manual up up Serial0/0/1 unassigned YES unset administratively down down Vlan1 unassigned YES manual administratively down down ————————R2#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.3.1 YES manual up up FastEthernet0/1 unassigned YES unset administratively down down Serial0/0/0 192.168.2.2 YES manual up up Serial0/0/1 unassigned YES unset down down Vlan1 unassigned YES manual administratively down down If both interfaces are up and up, then both routes will be in the routing table. Verify this again by using the show ip route command. Step 3: Test connectivity. Test connectivity by pinging from each host to the default gateway that has been configured for that host. From the host attached to R1, is it possible to ping the default gateway? __________ Yes From the host attached to R2, is it possible to ping the default gateway? __________ Yes If the answer is no for any of the above questions, troubleshoot the configurations to find the error using the following systematic process: 1. Check the PCs. Are they physically connected to the correct router? (Connection could be through a switch or directly.) ____________ Yes Are link lights blinking on all relevant ports? ____________ Yes 2. Check the PC configurations. Do they match the Topology Diagram? ____________ Yes 3. Check the router interfaces using the show ip interface brief command. Are the interfaces up and up? ____________ Yes If your answer to all three steps is yes, then you should be able to successfully ping the default gateway. Step 4: Test connectivity between router R1 and R2. From the router R1, is it possible to ping R2 using the command ping 192.168.2.2? ____________ YesFrom the router R2, is it possible to ping R1 using the command ping 192.168.2.1? ____________ YesIf the answer is no for the questions above, troubleshoot the configurations to find the error using the following systematic process: 1. Check the cabling. Are the routers physically connected? ____________ Yes Are link lights blinking on all relevant ports? ____________ Yes 2. Check the router configurations. Do they match the Topology Diagram? ____________ Yes Did you configure the clock rate command on the DCE side of the link? ____________ Yes 3. Check the router interfaces using the show ip interface brief command. Are the interfaces “up” and “up”? ____________ Yes If your answer to all three steps is yes, then you should be able to successfully ping from R2 to R1 and from R2 to R3. Task 7: Reflection Step 1: Attempt to ping from the host connected to R1 to the host connected to R2. This ping should be unsuccessful. Step 2: Attempt to ping from the host connected to R1 to router R2. This ping should be unsuccessful. Step 3: Attempt to ping from the host connected to R2 to router R1. This ping should be unsuccessful. What is missing from the network that is preventing communication between these devices? ________________________________________________________________________________ The routing information is not correct that’s why it is preventing communication between these devices. ________________________________________________________________________________ By configuring routing information correctly the routers will be able to route packets between the networks connected to R1 and R2 Task 8: Documentation On each router, capture the following command output to a text (.txt) file and save for future reference. • show running-config • show ip route • show ip interface brief If you need to review the procedures for capturing command output, refer to Lab 1.5.1, “Cabling a Network and Basic Router Configuration.” Task 9: Clean Up
Course Name: Database Systems Semester: Spring 24 Lab Assignment 3 You will use a database called Bank. Data for the Bank database is available here : https://docs.google.com/document/d/1dCRpz5RGNrUsB8uJwFgBPCPov8d1FyewIvb6i FaPyQ8/ Using the bank database, write MySQL queries for the following tasks: 1. Find the name and loan number of all customers having a loan at the Downtown branch. [2] 2. Find all the possible pairs of customers who are from the same city. show in the format Customer1, Customer2, City. [2] 3. If the bank gives out 4% interest to all accounts, show the total interest across each branch. Print Branch_name, Total_Interest [2] 4. Find account numbers with the highest balances for each city in the database [2] 5. Show the loan number, loan amount, and name of customers with the top 5 highest loan amounts. The data should be sorted by increasing amounts, then decreasing loan numbers in case of the same loan amount. [Hint for top 5: Check the “limit” keyword in mysql] [2] 6. Find the names of customers with an account and also a loan at the Perryridge branch. [2] 7. Find the total loan amount of all customers having at least 2 loans from the bank. Show in format customer name, total_loan. [2]
Course Name: Database Systems Semester: Spring 24 Lab Assignment 2 Proving yourself worthy of being able to handle more significant tasks, the tech lead has decided to give you a challenging job. However, this time, the data you would be handling is very sensitive and no one wants this data to be leaked. Therefore, instead of getting the entire table, the tech lead has given you the list of attributes that the table contains and the table name. The information given is as follows:Table Name: Employee Attribute Name Attribute type employee_id char(10) first_name varchar(20) last_name varchar(20) email varchar(60) phone_number char(14) job_id char(10) salary int commission_pct decimal(5,3) manager_id char(10) department_id char(10) You need to insert rows (around 10 or more to test all of the queries for the following tasks) as per the data types of the attributes/columns and problem statements of the following tasks. Employee IDs should be ‘EMP001’, ‘EMP002’, etc. Job IDs should be ‘JOB001’, ‘JOB002’, etc. Manager IDs should be ‘MNG001’, ‘MNG002’, etc. Department IDs should be DPT001, …, DPT005, … DPT007, etc. Write down the queries to retrieve the following information: [7 X 2 =14] 1. Find the first_name, last_name, email, phone_number, hire_date and department_id of all the employees with the latest hire_date. 2. Find the first_name, last_name, employee_id, phone_number, salary and department_id of all the employees with the lowest salary in each department. 3. Find the first_name, last_name, employee_id, commission_pct and department_id of all the employees in the department ‘DPT007’ who have a lower commission_pct than all of the department ‘DPT005’ employees. 4. Find the department_id and total number of employees of each department which does not have a single employee under it with a salary more than 30,000. 5. For each department, find the department_id, job_id and commission_pct with commission_pct less than at least one other job_id in that department. 6. Find the manager_id who does not have any employee under them with a salary less than 3500. 7. Find the first_name, last_name, employee_id, email, salary, department_id and commission_pct of the employee with the lowest commission_pct under each manager.
Submission Guidelines : 1.You can code all of them either in Python, CPP, or Java. But you should choose a specific language for all tasks. 2.For each task write separate python files like task2.py, task3.py, and so on. For problems that have subproblems, name those like task1A.py, task1B.py, and so on. 3.Add a hand written explanation of 3-4 lines for each of your solutions and submit that as a single document. 4.For each problem, take input from files called “inputX_Y.txt” and output at “outputX_Y.txt”, where X is the task number and Y is the sample i/o number. For example, for problem 2 sample 1, the input file is this, “input2_1.txt”. For problems that have subproblems, name the files like “input1a_1.txt”, “output1a_1.txt” and so on. Same for output. 5.For each task include at least one input file (if any) in the submission folder. 6.Finally zip all the files and rename this zip file as per this format:LabSectionNo_ID_CSE221LabAssignmentNo_Summer2023.zip [Example:LabSection01_21101XXX_CSE221LabAssignment08_Summer 7.Don’t copy from your friends. 8.You MUST follow all the guidelines, naming/file/zipping convention stated above. Failure to follow instructions will result in a straight 50% mark deduction. In the kingdom of Beluga, there are N cities connected by M roads, each with a maintenance cost associated with it. There is at least one path between any two cities. The king is concerned about the increasing maintenance cost and decides to take action. He calls upon his council, and they suggest that they find a minimum-cost set of roads that connects all cities while minimizing the maintenance cost. Then the king decides to reduce the total maintenance cost by destroying some of the existing roads, instead of building new ones. Since you are a very good programmer the king calls you. He asks you to find out what the lowest maintenance cost can be achieved after destroying a few roads while ensuring there still exists a path from each city to another. Input The first line of the input contains two space-separated integers, N and M (1 ≤ N ≤ 10^5, 1 ≤ M ≤ 10^6), representing the number of cities and roads in the kingdom of Beluga, respectively. The next M lines each contain three space-separated integers, u, v, and w (1 ≤ u, v ≤ N, 1 ≤ w ≤ 10^9), where u and v denote the endpoints of a road and w represents its maintenance cost. Output The output should contain a single integer, the minimum total maintenance cost achievable. Sample Input/Output: Sample Input 1 Sample Output 1 Sample Graph 1 5 7 1 2 1 3 1 4 2 3 2 5 3 44 5 10 8 6 7 7 12 9 28 Samp le Input 2 Sample Output 2 Sample Graph 2 6 9 1 2 2 4 2 3 1 3 4 3 2 6 2 5 5 6 5 1 6 5 4 8 4 1 3 2 7 17 Once upon a time, there was a small frog named Freddy. Freddy was always fascinated by the stairs that led up to the top of the nearby hill. The stairs had N steps and Freddy dreamed of climbing all the way to the top. Initially, Freddy is standing at the 0th stair. The only way to reach there is by climbing one or two steps at a time. Can you write a code to determine the number of distinct ways in which the frog can climb from the 0th step to the Nth step? Input An integer N representing the total number of stairs (1
Course Code: CSE 370 Credits: 3.0 Course Name: Database Systems Semester: Spring 24 Lab Assignment 1 member_id name email influence_count Joining_date multiplier Write the queries of the tasks given below [6 * 2 = 12]. 1. Create the above table with the appropriate data type for each column. 2. Change the column name “influence_count”. The new name should be “followers,” and the data type should be integer. 3. Update the number of followers of each developer by +10. 4. There is a formula to find the efficiency of the developers. Efficiency = ((followers*100/1000000) * (multipliers*100/20))/100. Show the efficiency of each developer in a column named “Efficiency” along with their name. 5. Show the name of the developers in UpperCase and the descending order of their Joining_date. 6. Retrieve the member_ id, name, email and followers of the developers who have either “.com” or “.net” in their email address.
Submission Guidelines : 1.You can code all of them either in Python, CPP, or Java. But you should choose a specific language for all tasks. 2.For each task write separate python files like task2.py, task3.py, and so on. For problems that have subproblems, name those like task1A.py, task1B.py, and so on. 3.Add a hand written explanation of 3-4 lines for each of your solutions and submit that as a single document. 4.For each problem, take input from files called “inputX_Y.txt” and output at “outputX_Y.txt”, where X is the task number and Y is the sample i/o number. For example, for problem 2 sample 1, the input file is this, “input2_1.txt”. For problems that have subproblems, name the files like “input1a_1.txt”, “output1a_1.txt” and so on. Same for output. 5.For each task include at least one input file (if any) in the submission folder. 6.Finally zip all the files and rename this zip file as per this format:LabSectionNo_ID_CSE221LabAssignmentNo_Summer2023.zip [Example:LabSection01_21101XXX_CSE221LabAssignment07_Summer 7.Don’t copy from your friends. 8.You MUST follow all the guidelines, naming/file/zipping convention stated above. Failure to follow instructions will result in a straight 50% mark deduction. Given a list of N intervals of time, your task is to determine the maximum number of tasks you can complete and which tasks they are. Input The input consists of a single integer N (1 ≤ N ≤ 10^5), the number of tasks, followed by N lines representing the tasks. Each task is represented by two integers Si and Ei (0 ≤ Si ≤ Ei ≤ 10^9), the start and end times of the task, respectively. Output Output a single integer k, the maximum number of tasks you can complete, followed by a line with k intervals of the tasks you can complete. If there are multiple solutions with the same maximum number of tasks, print any one of them. Sample Input/Output: Sample Input 1 Sample Output 1 6 1 3 2 5 3 7 4 6 6 87 9 3 1 3 4 6 6 8 Sample Input 2 Sample Output 2 5 1 4 2 5 6 7 4 8 3 6 2 1 4 6 7 Sample Input 3 Sample Output 3 7 0 4 3 4 1 5 9 10 6 9 2 3 1 2 5 1 2 2 3 3 4 6 9 9 10 Given N tasks and M people, where each task has a start time and end time, implement a greedy algorithm to find the maximum number of tasks that can be completed by M people. Input The input consists of two integers N and M (1 ≤ N, M ≤ 10^3), the number of activities and the number of people, respectively. This is followed by N lines representing the activities. Each line contains two integers Si and Ei (0 ≤ Si ≤ Ei ≤ 10^9), representing the start and end times of the activity, respectively. Output Output a single integer representing the maximum number of activities that can be completed. Sample Input/Output: Sample Input 1 Sample Output 1 5 2 1 5 3 6 2 5 8 10 6 9 4 Sample Input 2 Sample Output 2 5 2 1 4 2 5 6 7 4 8 3 6 4 Sample Input 3 Sample Output 3 5 2 1 10 2 10 6 7 4 8 3 6 3 Sample Input 4 Sample Output 4 8 3 5 7 2 4 6 8 8 10 1 3 7 9 3 5 2 6 8 Sample Input Explanation: In sample input 2- Person 1 will complete the tasks: 1-4, 4-8 Person 2 will complete the tasks: 2-5, 6-7 Study material: http://www.shafaetsplanet.com/?p=763 There is a group of N people living in a small village. They live in their own house. Although they are all neighbors, they don’t all know each other very well. Each person in that village has their own unique identity labeled with an integer value between 1 to N. Initially, the villagers don’t have any friends. As time passes by, they begin to make friendship between themselves. In this problem, you will be given a description of K friendships. You have to print an integer value which denotes the size of their friend circle. Suppose, there are five people living in the village labeled with 1,2,3,4 and 5. Initially, the size of each friend circle is one, since no friendship has been created yet. One day, person 1 and person 2 become friends. So the size of their friend circle becomes two. Next day, person 3 and person 4 become friends and the size of their friendship becomes two as well. After a few days, person 1 and person 4 become friends. Now the size of their friend circle becomes four consisting of persons 1,2,3 and 4. Input Format: The input consists of two integers, separated by a space, denoting the number of people in the village, N (1 ≤ N ≤ 10^5) and the number of queries that will follow, K (1 ≤ K ≤ 10^5). The next K lines contain two integers Ai and Bi each (1 ≤ Ai,Bi ≤ N and Ai != Bi), separated by a space, representing two people who have become friends as a result of the query. Output Format: For each query, output a single integer on a new line representing the size of the friend circle that the two people belong to after becoming friends. Sample Input/Output: Sample Input 1 Sample Output 1 5 3 1 2 3 4 1 4 2 2 4 Sample Input 2 Sample Output 2 8 7 2 4 4 5 3 6 4 7 3 1 2 7 6 2 2 3 2 4 3 4 7 Sample Input Explanation: In sample input 2, Query 0: Initially, there are 8 people in the village who do not know each other. {1} {2} {3} {4} {5} {6} {7} {8} Query 1: After person 2 and person 4 becoming friends: {1} {2,4} {3} {5} {6} {7} {8} The output is 2, since the size of the friends circle {2,4} is 2. Query 2: After person 4 and person 5 becoming friends: {1} {2,4,5} {3} {6} {7} {8} The output is 3, since the size of the friends circle {2,4,5} is 3. Query 3: After person 3 and person 6 becoming friends: {1} {2,4,5} {3,6} {7} {8} The output is 2, since the size of the friends circle {3,6} is 2. Query 4: After person 4 and person 7 becoming friends: {1} {2,4,5,7} {3,6} {8} The output is 4, since the size of the friends circle {2,4,5,7} is 4. Query 5: After person 3 and person 1 becoming friends: {2,4,5,7} {1,3,6} {8} The output is 3, since the size of the friends circle {1,3,6} is 3. Query 6: Since the person 2 and person 7 are already in the same friend circle, nothing changes: {2,4,5,7} {1,3,6} {8} The output is 4, since the size of the friends circle {2,4,5,7} is 4. Query 7: After person 6 and person 2 becoming friends: {1,2,3,4,5,6} {7} {8} The output is 7, since the size of the friends circle {1,2,3,4,5,6} is 7.
Lab Assignment 06 Submission Guidelines : 1.You can code all of them either in Python, CPP, or Java. But you should choose a specific language for all tasks. 2.For each task write separate python files like task2.py, task3.py, and so on. For problems that have subproblems, name those like task1A.py, task1B.py, and so on. 3.Add a hand written explanation of 3-4 lines for each of your solutions and submit that as a single document. 4.For each problem, take input from files called “inputX_Y.txt” and output at “outputX_Y.txt”, where X is the task number and Y is the sample i/o number. For example, for problem 2 sample 1, the input file is this, “input2_1.txt”. For problems that have subproblems, name the files like “input1a_1.txt”, “output1a_1.txt” and so on. Same for output. 5.For each task include at least one input file (if any) in the submission folder. 6.Finally zip all the files and rename this zip file as per this format:LabSectionNo_ID_CSE221LabAssignmentNo_Summer2023.zip [Example:LabSection01_21101XXX_CSE221LabAssignment06_Summer 7.Don’t copy from your friends. 8.You MUST follow all the guidelines, naming/file/zipping convention stated above. Failure to follow instructions will result in a straight 50% mark deduction. A useful tool for making graphs: https://csacademy.com/app/graph_editor/ Task 01: You are given a weighted, directed graph with N nodes and M edges. Each edge is represented as a triple (u, v, w), where u and v are the nodes connected by the edge and w is the weight of the edge. Your task is to find the shortest path from a source node S to all other nodes in the graph using Dijkstra’s algorithm. You should output the shortest distance from the source node to each of the other nodes in the graph. If a node is unreachable from the source node, its distance should be represented as -1. Input The first line of the input contains two integers, N and M (1
Lab Assignment 05 Submission Guidelines : 1.You can code all of them either in Python, CPP, or Java. But you should choose a specific language for all tasks. 2.For each task write separate python files like task2.py, task3.py, and so on. For problems that have subproblems, name those like task1A.py, task1B.py, and so on. 3.Add a hand written explanation of 3-4 lines for each of your solutions and submit that as a single document. 4.For each problem, take input from files called “inputX_Y.txt” and output at “outputX_Y.txt”, where X is the task number and Y is the sample i/o number. For example, for problem 2 sample 1, the input file is this, “input2_1.txt”. For problems that have subproblems, name the files like “input1a_1.txt”, “output1a_1.txt” and so on. Same for output. 5.For each task include at least one input file (if any) in the submission folder. 6.Finally zip all the files and rename this zip file as per this format:LabSectionNo_ID_CSE221LabAssignmentNo_Summer2023.zip [Example:LabSection01_21101XXX_CSE221LabAssignment05_Summer 7.Don’t copy from your friends. 8.You MUST follow all the guidelines, naming/file/zipping convention stated above. Failure to follow instructions will result in a straight 50% mark deduction. A useful tool for making graphs: https://csacademy.com/app/graph_editor/ Task 01 [30 points] We all know about the prerequisite course. For example, before taking CSE221, we have to complete CSE220. And prior to taking CSE220 we need to complete CSE111 and CSE110. The course sequence is as follows: CSE110 → CSE111 → CSE220 → CSE221 In this problem, there are N courses in the curriculum. There are M prerequisite requirements of the form “course A has to be completed before course B”. Your task is to find an order in which you can complete the courses. A)Solve it using the DFS approach. [15 points] B)Solve it using the BFS approach. [15 points] Input: The first input line has two integers N (1
Lab Assignment 04 Submission Guidelines : 1.You can code all of them either in Python, CPP, or Java. But you should choose a specific language for all tasks. 2.For each task write separate python files like task2.py, task3.py, and so on. For problems that have subproblems, name those like task1A.py, task1B.py, and so on. 3.Add a hand written explanation of 3-4 lines for each of your solutions and submit that as a single document. 4.For each problem, take input from files called “inputX_Y.txt” and output at “outputX_Y.txt”, where X is the task number and Y is the sample i/o number. For example, for problem 2 sample 1, the input file is this, “input2_1.txt”. For problems that have subproblems, name the files like “input1a_1.txt”, “output1a_1.txt” and so on. Same for output. 5.For each task include at least one input file (if any) in the submission folder. 6.Finally zip all the files and rename this zip file as per this format:LabSectionNo_ID_CSE221LabAssignmentNo_Summer2023.zip [Example:LabSection01_21101XXX_CSE221LabAssignment05_Summer 7.Don’t copy from your friends. 8.You MUST follow all the guidelines, naming/file/zipping convention stated above. Failure to follow instructions will result in a straight 50% mark deduction. A useful tool for making graphs: https://csacademy.com/app/graph_editor/ You can find all the Input Files of this lab from here: https://drive.google.com/drive/folders/10grRR3iRIfVn6kFLyD86-n8x QewUNU9n?usp=sharing Task 01 (Graph Representation): A) You are given a directed weighted Graph, G. The graph consists of N vertices and M edges. In this problem, you have to store the graph using Adjacency Matrix and print the matrix. Input: The first line contains two integers N and M (1