Suppose you roll a single 6 sided die until you get a 4 or h…

Suppose you roll a single 6 sided die until you get a 4 or higher.  Round to 3 decimal places as necessary. a) What is the probability of rolling a success in this situation? [a] b) How many rolls are expected to find the first success? [b] c) Find the probability that the third roll gives a 4 or higher.  [c] d) Find the probability that it takes at most 8 rolls to get a 4 or higher. [d] e) Find the probability that it takes more than 3 rolls to get a 4 or higher. [e]

Consider the following program. Stack {  public Node top…

Consider the following program. Stack {  public Node top;}Node {  public Node next;  public Data info;}Data {  public int x;  public Node ref;} int main() { Stack s1 = new Stack(); //h1 Node n1 = new Node(); //h2 s1.top = n1; n1.next = new Node(); //h3 Data d = new Data(); //h4 n1.info = d; d.ref = n1; Node n2 = new Node(); //h5 n2.info = new Data(); //h6 n2.info.ref = n2; s1.top.next = n2; Stack s2 = new Stack(); //h7 s2.top = n1.next;} Which of the below points-to graphs is constructed by the above pointer analysis using allocation-site based heap abstraction for this program?  A B C D Correct points-to graph: [graph]   Expression 1 Expression 2 They do NOT point to the same object in any (concrete) run of the program The above pointer analysis proves using allocation-site based heap abstraction that they CANNOT point to the same object in any run of the program The above pointer analysis proves using the type based heap abstraction that they CANNOT point to the same object in any run of the program d s1 [row1NoPoint] [row1Allocation] [row1Heap] s1 s2 [row2NoPoint] [row2Allocation] [row2Heap] s1.top s2.top [row3NoPoint] [row3Allocation] [row3Heap] n1 n2 [row4NoPoint] [row4Allocation] [row4Heap] n1.next n2 [row5NoPoint] [row5Allocation] [row5Heap] There are 3 columns for answers in the above table. If you are unable to click the last column, you may be able to use keyboard commands like tab, the arrow keys, and enter to select the values in the last column. If you are still not able to enter values for the last column, please put your work in the scratch box below and notify us via Ed private post after submitting your exam that you have done so.

Consider the following program. Stack {  public Node top…

Consider the following program. Stack {  public Node top;}Node {  public Node next;  public Data info;}Data {  public int x;  public Node ref;} int main() { Stack s1 = new Stack(); //h1 Node n1 = new Node(); //h2 s1.top = n1; n1.next = new Node(); //h3 Data d = new Data(); //h4 n1.info = d; d.ref = n1; Node n2 = new Node(); //h5 n2.info = new Data(); //h6 n2.info.ref = n2; s1.top.next = n2; Stack s2 = new Stack(); //h7 s2.top = n1.next;} Which of the below points-to graphs is constructed by the above pointer analysis using allocation-site based heap abstraction for this program?  A B C D Correct points-to graph: [graph]   Expression 1 Expression 2 They do NOT point to the same object in any (concrete) run of the program The above pointer analysis proves using allocation-site based heap abstraction that they CANNOT point to the same object in any run of the program The above pointer analysis proves using the type based heap abstraction that they CANNOT point to the same object in any run of the program d s1 [row1NoPoint] [row1Allocation] [row1Heap] s1 s2 [row2NoPoint] [row2Allocation] [row2Heap] s1.top.next s2.top [row3NoPoint] [row3Allocation] [row3Heap] n1.info n2.info [row4NoPoint] [row4Allocation] [row4Heap] n1.info.ref n2.info.ref [row5NoPoint] [row5Allocation] [row5Heap] There are 3 columns for answers in the above table. If you are unable to click the last column, you may be able to use keyboard commands like tab, the arrow keys, and enter to select the values in the last column. If you are still not able to enter values for the last column, please put your work in the scratch box below and notify us via Ed private post after submitting your exam that you have done so.