COMP3121 Archives - Mantutor https://mantutor.com/product-category/comp3121/feed/ Programming Help · Debugging · Full-Stack Learning Tue, 09 Jan 2024 09:00:21 +0000 en-US hourly 1 https://i0.wp.com/mantutor.com/wp-content/uploads/2022/02/cropped-mantutor2.png?fit=32%2C32&ssl=1 COMP3121 Archives - Mantutor https://mantutor.com/product-category/comp3121/feed/ 32 32 182416984 COMP3121 Homework 6 https://mantutor.com/product/comp3121-you-need-to-give-reasoning-of-how-you-derive-your-answers-no-mark-if-no-reasoning-is-given-solved-2/ Tue, 12 Dec 2023 07:47:37 +0000 https://mantutor.com/?post_type=product&p=102815 Question 1 1000 cars travel from A to B. There are two possible routes: the upper route through C or the lower route through D. Let x be the number of cars traveling on the edge (A, C) and let y be the number of cars traveling on the edge (D, B). The directed graph […]

The post COMP3121 Homework 6 appeared first on Mantutor.

]]>
Question 1

1000 cars travel from A to B. There are two possible routes: the upper route through C or the lower route through D. Let x be the number of cars traveling on the edge (A, C) and let y be the number of cars traveling on the edge (D, B). The directed graph in the Figure indicates that the travel time of a car on edge (A, C) is x/100 if there are x cars on edge (A, C), and similarly the travel time of a car on edge (D, B) is y/100 if there are y cars on edge (D, B). The travel time of a car on edges (C, B) and (A, D) is 12 regardless of the number of cars on these edges.

Each driver wants to minimize his travel time. The drivers make simultaneous choices.

(a) Find the Nash equilibrium of x and y.

(b) Now the government builds a new one-way road from town C to town D, with a travel time of 0. Find the Nash equilibrium of x and y.

(c) Suppose now that the conditions on edges (C, B) and (A, D) improves so that the travel time on each edge is reduced to 5. The road from C to D that was constructed in part (b) is still available. Find the Nash equilibrium of x and y.

Question 2

Suppose we have 3 sellers a, b and c, and 3 buyers x, y and z. Each seller has a car park for sale, and the valuations of the buyers are as follows.

Buyer Valuation on a’s car park Valuation on b’s car park Valuation on c’s car park
X 6 5 2
Y 7 6 3
Z 6 7 6

There are 4 sets of prices for a’s, b’s and c’s car parks.

1. a=0, b=0, c=0
2. a=2, b=1, c=0
3. a=0, b=1, c=0
4. a=3, b=1, c=0

How many sets are market-clearing prices?

A. 0
B. 1
C. 2
D. 3
E. 4

The post COMP3121 Homework 6 appeared first on Mantutor.

]]>
102815
COMP3121 Homework 5 https://mantutor.com/product/comp3121-you-need-to-give-reasoning-of-how-you-derive-your-answers-no-mark-if-no-reasoning-is-given-solved/ Tue, 12 Dec 2023 07:46:46 +0000 https://mantutor.com/?post_type=product&p=102813 Question 1 Read the following payoff matrix. Select the correct statement(s) below. 1. Neither player A nor player B has a dominant strategy. 2. Player A has a dominant strategy D whereas player B has the dominant strategy R. 3. Only player B has a dominant strategy L. The best response of player A is […]

The post COMP3121 Homework 5 appeared first on Mantutor.

]]>
Question 1

Read the following payoff matrix. Select the correct statement(s) below.

1. Neither player A nor player B has a dominant strategy.
2. Player A has a dominant strategy D whereas player B has the dominant strategy R.
3. Only player B has a dominant strategy L. The best response of player A is strategy D.
4. Only player B has a dominant strategy L. The best response of player A is strategy U.

Question 2

When multiple Nash Equilibria exist in a game, what should the players’ action be?

1. Select the equilibrium with maximum payoff
2. Need more external information to make decisions
3. There is no rule to predict on the unique choice of the players
4. Select the equilibrium with high payoff and low risk

Question 3

Select all Nash equilibrium under the following payoff matrix

1. (D,L)
2. (1/3, 2/3)
3. (1/2, 1/2)
4. (1/4, 3/4)
5. (U,R)
6. (D,R)

Question 4

Select the Nash equilibrium for mixed strategy under the following payoff matrix.

1. (1/2, 1/2)
2. (1/3, 2/3)
3. (1/4, 3/4)
4. (1,0)

Question 5

A strategy is weakly dominant if, regardless of what any other players do, the strategy earns a player a payoff at least as high as any other strategy, and, the strategy earns a strictly higher payoff for some profile of other players’ strategies. Hence, a strategy is weakly dominant if it is always at least as good as any other strategy, for any profile of other players’ actions, and is strictly better for some profile of others’ strategies.

Consider the following two questions with the following game

1. ______ Nash equilibrium
2. ______ Nash equilibrium using weak dominant strategy

Which of the following is correct in filling up the two questions?
1. There exists, There is no
2. There is no, There is no
3. There exists, There exists

The post COMP3121 Homework 5 appeared first on Mantutor.

]]>
102813
COMP3121 – Question 1 https://mantutor.com/product/comp3121-question-1-solved/ Tue, 12 Dec 2023 07:45:40 +0000 https://mantutor.com/?post_type=product&p=102811 Modeling the scenario into a game A river flows through two countries, A and B. It starts in country A, and then flows through B to the ocean. Both countries can either dam the river (and get electricity) or fish the river. If either country dams the river, it hurts the fish population in the […]

The post COMP3121 – Question 1 appeared first on Mantutor.

]]>
Modeling the scenario into a game

A river flows through two countries, A and B. It starts in country A, and then flows through B to the ocean. Both countries can either dam the river (and get electricity) or fish the river. If either country dams the river, it hurts the fish population in the river (either by decreasing the water flow downstream, or preventing fish from swimming upstream). So if one dams and the other fishes, it’s bad for the one who fishes. If they both fish, it’s good for both, but not as good as if they both dam, since the electric power is worth more than the fish.

Question 2

Modeling the scenario into a game

Minority game: Three agents each have two possible actions. Whichever agent ends up in the minority (choosing a different action from the other two) wins.

The post COMP3121 – Question 1 appeared first on Mantutor.

]]>
102811
COMP3121 Homework 3 https://mantutor.com/product/comp3121-you-need-to-give-the-reasoning-of-your-answers-for-both-why-you-choose-and-why-you-do-not-choose-otherwise-there-is-no-mark-solved-3/ Tue, 12 Dec 2023 07:44:35 +0000 https://mantutor.com/?post_type=product&p=102809 Question 1 Suppose you’re working with a group of researchers studying social networks, with a particular focus on the distances between people in such networks, and the broader implications for the small-world phenomenon. The research group is currently negotiating an agreement with a large mobile phone carrier to get a snapshot of their “who-calls-whom” graph. […]

The post COMP3121 Homework 3 appeared first on Mantutor.

]]>
Question 1

Suppose you’re working with a group of researchers studying social networks, with a particular focus on the distances between people in such networks, and the broader implications for the small-world phenomenon.

The research group is currently negotiating an agreement with a large mobile phone carrier to get a snapshot of their “who-calls-whom” graph. With agreement, the carrier provides a graph in which a node represents a customer, and an edge represents two people who have called each other in the past year. (The edges will be annotated with the number of calls and the time of each call.) Recently, the carrier proposes that they will only provide edges where two people have called each other at least once a week on average in the past year. (In other words, all nodes will be presented, but there will only be edges where two people talked at least 52 times.) The carrier understands that this is not the full network, but they argue that this is a good approximation to the full network.

Given such change, which of the following statement is true?

1) This will reduce the weak tie edges in the network
2) This will NOT reduce the weak tie edges in the network

Question 2

Consider the following graph. The distance is defined as the relative position traversing from node to another node. For instance, the distance of node 0 and node A is 6. What is the path outputted by decentralized search between node 0 and node 9, and why?

1) 0-C-8-9
2) 0-1-D-9
3) 0-C-B-A-9
4) 0-4-9

The post COMP3121 Homework 3 appeared first on Mantutor.

]]>
102809
COMP3121 Homework 2 https://mantutor.com/product/comp3121-you-need-to-give-the-reasoning-of-your-answers-for-both-why-you-choose-and-why-you-do-not-choose-otherwise-there-is-no-mark-solved-2/ Tue, 12 Dec 2023 07:43:12 +0000 https://mantutor.com/?post_type=product&p=102807 Question 1 Affiliation network is an example of bipartite graphs. An affiliation network has two categories, people and foci, where each edge connects a person to a focus that he or she participates in. Consider the following graph. On the left hand side, there are 7 nodes representing people whereas on the right hand side, […]

The post COMP3121 Homework 2 appeared first on Mantutor.

]]>
Question 1

Affiliation network is an example of bipartite graphs. An affiliation network has two categories, people and foci, where each edge connects a person to a focus that he or she participates in. Consider the following graph. On the left hand side, there are 7 nodes representing people whereas on the right hand side, there are 5 nodes representing companies (foci). If a person is on the director board of a company, there will have an edge connecting the person node and the company node.

Given a bipartite affiliation graph, showing the membership of people in different social foci, researchers sometimes create a projected graph on just the people, in which we join two people when they have a focus in common. An edge will be formed between two persons to represent they participated in the same social activity. Please select which of the following graph represents such “projection” of the graph above.

1.
2.
3.
4.

Question 2

Projected graph satisfies: an edge will be formed if and only if two individuals participate the same social activities (foci).

If the following graph is a projection of an affiliation network, what is the minimum number of social activities (foci) in that affiliation network?

The post COMP3121 Homework 2 appeared first on Mantutor.

]]>
102807
COMP3121 Homework 1 https://mantutor.com/product/comp3121-you-need-to-give-the-reasoning-of-your-answers-for-both-why-you-choose-and-why-you-do-not-choose-otherwise-there-is-no-mark-solved/ Tue, 12 Dec 2023 07:42:05 +0000 https://mantutor.com/?post_type=product&p=102805 Question 1 A shortest path between two nodes is a path of the minimum possible length. We say that a node X is pivotal for a pair of distinct nodes Y and Z if X lies on every shortest path between Y and Z (and X is not equal to either Y or Z). According […]

The post COMP3121 Homework 1 appeared first on Mantutor.

]]>
Question 1

A shortest path between two nodes is a path of the minimum possible length. We say that a node X is pivotal for a pair of distinct nodes Y and Z if X lies on every shortest path between Y and Z (and X is not equal to either Y or Z).

According to the above figure, which of the following statement(s) are correct?

1. Node B is pivotal for node pair of D – E
2. Node B is pivotal for node pairs of A – C and A – D
3. There is no pivotal for node pair D – E
4. Node D is not a pivotal for any pairs of distinct nodes

Question 2

Recall the definition of shortest path and pivotal stated in Question 1. Consider the following polygons where each vertex is a node. Which polygon satisfies that every node in this polygon is a pivotal of at least one node pair?

Question 3

Recall the definition of shortest path and pivotal stated in Question 1. Consider the following polygons where each vertex is a node. Which polygon satisfies that every node in this polygon is a pivotal of at least two node pairs?

The following definitions are useful for question 4 and 5.

A node X is called a gatekeeper if for some other two nodes Y and Z, every path from Y to Z passes through X. A node X is called a local gatekeeper if there are two neighbors of X, say Y and Z, that are not connected by an edge. (That is, for X to be a local gatekeeper, there should be two nodes Y and Z so that Y and Z each have edges to X, but not to each other.)

Question 4

Based on the definition of “Gatekeeper” and “Local Gatekeeper”, please consider the following statements and select the correct one(s) w.r.t the graph below.

1. The number of local gatekeeper remains unchanged when an edge between node B and E is added
2. Node D is gatekeeper
3. Node A is local gatekeeper
4. There are 2 local gatekeepers in the above graph

Question 5

Based on the definition of “Gatekeeper” and “Local Gatekeeper”, please consider the following statements and select the correct one(s) w.r.t the graph below.

1. If the edge between node A and B is removed, node C will be gatekeeper.
2. Over half of the number of nodes are local gatekeepers
3. If the edge between node B and C is removed, all of the nodes will be local gatekeepers.
4. If the edge between node C and D is removed, node B will be gatekeeper.

The post COMP3121 Homework 1 appeared first on Mantutor.

]]>
102805
COMP3121 – Homework6 – https://mantutor.com/product/comp3121-homework6-solved/ Sun, 02 Oct 2022 10:15:43 +0000 https://mantutor.com/?post_type=product&p=88732 Question 1   1000 cars travel from A to B. There are two possible routes: the upper route through C or the lower route through D. Let x be the number of cars traveling on the edge (A, C) and let y be the number of cars traveling on the edge (D, B). The directed […]

The post COMP3121 – Homework6 – appeared first on Mantutor.

]]>
Question 1

 

1000 cars travel from A to B. There are two possible routes: the upper route through C or the lower route through D. Let x be the number of cars traveling on the edge (A, C) and let y be the number of cars traveling on the edge (D, B). The directed graph in the Figure indicates that the travel time of a car on edge (A, C) is x/100 if there are x cars on edge (A, C), and similarly the travel time of a car on edge (D, B) is y/100 if there are y cars on edge (D, B). The travel time of a car on edges (C, B) and (A, D) is 12 regardless of the number of cars on these edges.

 

Each driver wants to minimize his travel time. The drivers make simultaneous choices.

 

  • Find the Nash equilibrium of x and y.

 

  • Now the government builds a new one-way road from town C to town D, with a travel time of 0. Find the Nash equilibrium of x and y.

 

  • Suppose now that the conditions on edges (C, B) and (A, D) improves so that the travel time on each edge is reduced to 5. The road from C to D that was constructed in part (b) is still available. Find the Nash equilibrium of x and y.

 

 

Question 2

 

Suppose we have 3 sellers a, b and c, and 3 buyers x, y and z. Each seller has a car park for sale, and the valuations of the buyers are as follows.

 

Buyer Valuation on a’s car park Valuation on b’s car park Valuation on c’s car park
X 6 5 2
Y 7 6 3
Z 6 7 6

 

There are 4 sets of prices for a’s, b’s and c’s car parks.

 

  1. a=0, b=0, c=0
  2. a=2, b=1, c=0
  3. a=0, b=1, c=0
  4. a=3, b=1, c=0

 

How many sets are market-clearing prices?

 

  1. 0
  2. 1
  3. 2
  4. 3

The post COMP3121 – Homework6 – appeared first on Mantutor.

]]>
88732
COMP3121 – Homework5 – https://mantutor.com/product/comp3121-homework5-solved/ Sun, 02 Oct 2022 10:14:37 +0000 https://mantutor.com/?post_type=product&p=88731 Question 1   Read the following payoff matrix. Select the correct statement(s) below.       Neither player A nor player B has a dominant strategy. Player A has a dominant strategy D whereas player B has the dominant strategy R. Only player B has a dominant strategy L. The best response of player A […]

The post COMP3121 – Homework5 – appeared first on Mantutor.

]]>
Question 1

 

Read the following payoff matrix. Select the correct statement(s) below.

 

 

 

  1. Neither player A nor player B has a dominant strategy.
  2. Player A has a dominant strategy D whereas player B has the dominant strategy R.
  3. Only player B has a dominant strategy L. The best response of player A is strategy D.
  4. Only player B has a dominant strategy L. The best response of player A is strategy U.

 

Question 2

 

When multiple Nash Equilibria exist in a game, what should the players’ action be?

 

  1. Select the equilibrium with maximum payoff
  2. Need more external information to make decisions
  3. There is no rule to predict on the unique choice of the players
  4. Select the equilibrium with high payoff and low risk

 

Question 3

 

Select all Nash equilibrium under the following payoff matrix

 

 

  1. (D,L)
  2. (1/3, 2/3)
  3. (1/2, 1/2)
  4. (1/4, 3/4)
  5. (U,R)
  6. (D,R)

 

 

 

Question 4

 

Select the Nash equilibrium for mixed strategy under the following payoff matrix.

 

  1. (1/2, 1/2)
  2. (1/3, 2/3)
  3. (1/4, 3/4)
  4. (1,0)

 

Question 5

 

A strategy is weakly dominant if, regardless of what any other players do, the strategy earns a player a payoff at least as high as any other strategy, and, the strategy earns a strictly higher payoff for some profile of other players’ strategies. Hence, a strategy is weakly dominant if it is always at least as good as any other strategy, for any profile of other players’ actions, and is strictly better for some profile of others’ strategies.

 

Consider the following two questions with the following game

 

  1. ______ Nash equilibrium
  2. ______ Nash equilibrium using weak dominant strategy

 

Which of the following is correct in filling up the two questions?

  1. There exists, There is no
  2. There is no, There is no
  3. There exists, There exists

The post COMP3121 – Homework5 – appeared first on Mantutor.

]]>
88731
COMP3121 – Homework4 – https://mantutor.com/product/comp3121-homework4-solved/ Sun, 02 Oct 2022 10:13:52 +0000 https://mantutor.com/?post_type=product&p=88730 Question 1   Modeling the scenario into a game   A river flows through two countries, A and B. It starts in country A, and then flows through B to the ocean. Both countries can either dam the river (and get electricity) or fish the river. If either country dams the river, it hurts the […]

The post COMP3121 – Homework4 – appeared first on Mantutor.

]]>
Question 1

 

Modeling the scenario into a game

 

A river flows through two countries, A and B. It starts in country A, and then flows through B to the ocean. Both countries can either dam the river (and get electricity) or fish the river. If either country dams the river, it hurts the fish population in the river (either by decreasing the water flow downstream, or preventing fish from swimming upstream). So if one dams and the other fishes, it’s bad for the one who fishes. If they both fish, it’s good for both, but not as good as if they both dam, since the electric power is worth more than the fish.

 

Question 2

 

Modeling the scenario into a game

 

Minority game: Three agents each have two possible actions. Whichever agent ends up in the minority (choosing a different action from the other two) wins.

The post COMP3121 – Homework4 – appeared first on Mantutor.

]]>
88730
COMP3121 – Homework3 – https://mantutor.com/product/comp3121-homework3-solved/ Sun, 02 Oct 2022 10:13:46 +0000 https://mantutor.com/?post_type=product&p=88729 Question 1   Suppose you’re working with a group of researchers studying social networks, with a particular focus on the distances between people in such networks, and the broader implications for the small-world phenomenon.   The research group is currently negotiating an agreement with a large mobile phone carrier to get a snapshot of their […]

The post COMP3121 – Homework3 – appeared first on Mantutor.

]]>
Question 1

 

Suppose you’re working with a group of researchers studying social networks, with a particular focus on the distances between people in such networks, and the broader implications for the small-world phenomenon.

 

The research group is currently negotiating an agreement with a large mobile phone carrier to get a snapshot of their “who-calls-whom” graph. With agreement, the carrier provides a graph in which a node represents a customer, and an edge represents two people who have called each other in the past year. (The edges will be annotated with the number of calls and the time of each call.) Recently, the carrier proposes that they will only provide edges where two people have called each other at least once a week on average in the past year. (In other words, all nodes will be presented, but there will only be edges where two people talked at least 52 times.) The carrier understands that this is not the full network, but they argue that this is a good approximation to the full network.

 

Given such change, which of the following statement is true?

 

  • This will reduce the weak tie edges in the network
  • This will NOT reduce the weak tie edges in the network

 

Question 2

 

Consider the following graph. The distance is defined as the relative position traversing from node to another node. For instance, the distance of node 0 and node A is 6. What is the path outputted by decentralized search between node 0 and node 9, and why?

 

 

 

  • 0-C-8-9
  • 0-1-D-9
  • 0-C-B-A-9
  • 0-4-9

The post COMP3121 – Homework3 – appeared first on Mantutor.

]]>
88729