## In programming languages that support concurrency with multithreading, you can access more than one control thread running in one

Question In programming languages that support concurrency with multithreading, you can access more than one control thread running in one program.Question: what will happen with respect to two threads that want to change the value of a variable that can be accessed together, with x = x 1, where x (integer, initial value: 0) is the name variable?It is assumed that each thread performs 100,000 operations as successively. Code a simple program and display the output to support your answer With Java Programming Language

## Module 4.1 Guided Assignment 1: Graph Data Type 1. Graph Data Type (1 points)

Question Get Answer Module 4.1 Guided Assignment 1: Graph Data Type 1. Graph Data Type (1 points) Read the textbook sections:Representation alternatives (pg 524)Adjacency-lists data structure (pg 525-527)Class Graph (Graph Data Type) (pg 526)Test Search (pg 529)Implement the class GraphImplement a detailedPrint() method that will show in the output (for tinyG.txt, page 522, 524):Number of vertices: 13Number of edges: 13adj[0] = (6, 2, 1, 5)adj[1] = (0)adj[2] = (0)adj[3] = (5, 4)…Implement TestGraph class that will read the description of a graph and print the detailed description Test with tinyG.txt; mediumG.txt; largeG.txtInclude screenshots with the execution (for the large graphs you do not need to include all the nodes, just the few first)Data source:https://algs4.cs.princeton.edu/41graph/tinyG.txthttps://algs4.cs.princeton.edu/41graph/mediumG.txthttps://algs4.cs.princeton.edu/41graph/largeG.txt

## Module 4.1 Guided Assignment 2: Graph Processing Code 2. Graph Processing Code

Question Get Answer Module 4.1 Guided Assignment 2: Graph Processing Code 2. Graph Processing Code Read the textbook sectionUndirected graph data type – API (pg 522)Typical graph processing code (pg 525-527)Operations (pg 527)Implement the following methodsCompute the degree of a vertex (0.1)Compute the maximum degree in the graph (0.1)Compute the minimum degree in the graph (0.1)Compute the average degree in the graph (0.1)Count the number of self-loops (0.1)Count the number of parallel vertices (0.1)Add a vertex (0.1)Delete a vertex (0.1)Delete an edge (0.1)Check whether the graph contains the edge v-w (0.1)Implement TestGraphOperations class that will read the description of a graph and print the detailed description (each tested method 0.1) Test with tinyG.txt; mediumG.txt; largeG.txt; and random operations for eachStart by printing the graph (if the number of vertices is less than 20)Apply all the counting operations on each graphFor each graph add 10 vertices, print the graph if the number of vertices is less than 30 and then delete the 10 vertices in the order they were addedFor each graph add 10 random edges, print the graph if the number of vertices is less than 30, and then delete the 10 edges in the order they were addedFor each graph test if they contain 10 randomly generated edges. Print the results.

## Module 4.1: Guided Assignment 3: Is connected using DFS search Read the textbook sections:

Question Get Answer Module 4.1: Guided Assignment 3: Is connected using DFS search Read the textbook sections: Depth-first search(pg 530)Searching in a maze (pg 530)Warmup (pg 531)Class DepthFirstSearch (pg 531)One way passages (pg 532)Tracing DFS (pg 532)Detailed trace of DFS (pg 533)Implement the class DepthFirstSearchMake a method isConnected that will return true if the graph is connectedImplement TestConnected class that will read the description of a graph, print the detailed description if it has less than 30 nodes and then print if the graph is connected or notTest with tinyG.txt; mediumG.txt; largeG.txtInclude screenshots with the execution (for the large graphs you do not need to include all the nodes, just the few first)

## Module 4.1 Guided Assignment 1: Graph Data Type 1. Graph Data Type

Question Module 4.1 Guided Assignment 1: Graph Data Type 1. Graph Data Type · Implement the class Graph· Implement a detailedPrint() method that will show in the output (for tinyG.txt):o Number of vertices: 13o Number of edges: 13o adj[0] = (6, 2, 1, 5)o adj[1] = (0)o adj[2] = (0)o adj[3] = (5, 4)o …· Implement TestGraph class that will read the description of a graph and print the detailed description · Test with tinyG.txt; mediumG.txt; largeG.txt· Include screenshots with the execution (for the large graphs you do not need to include all the nodes, just the few first)Data source:https://algs4.cs.princeton.edu/41graph/tinyG.txthttps://algs4.cs.princeton.edu/41graph/mediumG.txt https://algs4.cs.princeton.edu/41graph/largeG.txt

## For each of the integral given below, do the following using Python Programming

Question For each of the integral given below, do the following using Python Programming a) plot the graph related to Trapezoidal’s rule or Simpson’s Rule for number of intervals that have chosen from N = 5 to 20 intervals (choose one only)b) approximate each of the given integral using both Trapezoidal’s rule and Simpson’s rule using two different number of intervals for each case 1) ∫02▒〖”(“x3″ x 1dx”〗 2) ∫01▒〖sin(x2)”dx”〗 3) ∫24▒〖””1/(1 x3)〗”dx” 4) ∫26▒〖””1/(lnx)〗”dx”