Click here to Skip to main content
15,892,253 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Find the best path Pin
Patrice T2-Dec-19 12:28
mvePatrice T2-Dec-19 12:28 
AnswerRe: Find the best path Pin
Member 146753785-Dec-19 19:45
Member 146753785-Dec-19 19:45 
QuestionHelp w/ recursive algorithm Pin
Member 1466815525-Nov-19 16:03
Member 1466815525-Nov-19 16:03 
AnswerRe: Help w/ recursive algorithm Pin
Gerry Schmitz26-Nov-19 6:58
mveGerry Schmitz26-Nov-19 6:58 
GeneralRe: Help w/ recursive algorithm Pin
Member 1466815526-Nov-19 15:12
Member 1466815526-Nov-19 15:12 
QuestionAlgorithm homework - Kruskal’s algorithm Pin
Member 1465409212-Nov-19 23:41
Member 1465409212-Nov-19 23:41 
AnswerRe: Algorithm homework - Kruskal’s algorithm Pin
OriginalGriff12-Nov-19 23:44
mveOriginalGriff12-Nov-19 23:44 
QuestionAlgorithm homework Pin
Member 1465409212-Nov-19 23:41
Member 1465409212-Nov-19 23:41 
Philip decided to supplement his income by participating in the popular game
show ‘Open the Boxes and keep the Best!’. The game is played in turns. At every turn, the
host shows Philip a box that can be opened by paying ci > 0. The box will contain a random
prize: in particular its value could be anything in {0, 1, 2, . . . , n}, uniformly at random.
At every step, Philip can stop playing and keep only one prize, the best found so far. Of course,
the costs he paid are not refunded. All of the boxes are known in advance, as well as the order
the host will present them. Help Philip find the optimal strategy and calculate his expected
payoff, which is the prize he keeps minus the total cost paid.
Goal: Given as input the number of boxes k, the number of different rewards n as well as
the cost ci (which is guaranteed to be integer) of every box:
1. Design a O(n^2· k) algorithm to find the expected optimal reward.
2. Improve the complexity to O(n · k).
Hint: One way is to use dynamic programming

can you help me to find a solution?

AnswerRe: Algorithm homework Pin
OriginalGriff12-Nov-19 23:43
mveOriginalGriff12-Nov-19 23:43 
QuestionHelp to draw recursive shape inside 2d array javascript Pin
Member 146476276-Nov-19 23:00
Member 146476276-Nov-19 23:00 
AnswerRe: Help to draw recursive shape inside 2d array javascript Pin
Richard MacCutchan6-Nov-19 23:24
mveRichard MacCutchan6-Nov-19 23:24 
Questionanyone know how to implement arden's theorem or the state removal method to convert an FA to a regex expression? Pin
honey the codewitch21-Sep-19 7:54
mvahoney the codewitch21-Sep-19 7:54 
QuestionHelp with algorithmic efficiency Pin
danirdd928-Sep-19 10:52
danirdd928-Sep-19 10:52 
AnswerRe: Help with algorithmic efficiency Pin
Richard Deeming10-Sep-19 1:22
mveRichard Deeming10-Sep-19 1:22 
GeneralRe: Help with algorithmic efficiency Pin
danirdd9210-Sep-19 12:58
danirdd9210-Sep-19 12:58 
GeneralRe: Help with algorithmic efficiency Pin
Richard Deeming11-Sep-19 23:13
mveRichard Deeming11-Sep-19 23:13 
AnswerRe: Help with algorithmic efficiency Pin
Gerry Schmitz10-Sep-19 19:00
mveGerry Schmitz10-Sep-19 19:00 
GeneralRe: Help with algorithmic efficiency Pin
danirdd9210-Sep-19 22:19
danirdd9210-Sep-19 22:19 
GeneralRe: Help with algorithmic efficiency Pin
Gerry Schmitz11-Sep-19 16:36
mveGerry Schmitz11-Sep-19 16:36 
QuestionSorting algorithm faster than quick sort Pin
Shuji Kaya15-Aug-19 19:36
Shuji Kaya15-Aug-19 19:36 
AnswerRe: Sorting algorithm faster than quick sort Pin
OriginalGriff15-Aug-19 19:52
mveOriginalGriff15-Aug-19 19:52 
GeneralRe: Sorting algorithm faster than quick sort Pin
Shuji Kaya16-Aug-19 22:13
Shuji Kaya16-Aug-19 22:13 
GeneralRe: Sorting algorithm faster than quick sort Pin
OriginalGriff16-Aug-19 22:22
mveOriginalGriff16-Aug-19 22:22 
GeneralRe: Sorting algorithm faster than quick sort Pin
DaveAuld20-Aug-19 20:29
professionalDaveAuld20-Aug-19 20:29 
AnswerRe: Sorting algorithm faster than quick sort Pin
Shuji Kaya16-Aug-19 21:51
Shuji Kaya16-Aug-19 21:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.