Engineering
Engineering, 06.05.2020 05:37, MileenaKitana

P14.7.9 Here is an optimization problem that we can solve with the aid of an ordinary NFA and another technique from Chapter 9. We are given a finite set S of nonempty words over 2, and a string w of length n over E. We would like to find non-overlapping occurrences of words in S within w, to use as many as possible of the letters in w. We are allowed to use the same word in S multiple times if that is best. (a) Build an ordinary NFA N, with one final state that is also the start state, such that an accepting w-path corresponds to a set of non-overlapping occurrences of words from S within w. (b) In Chapter 9 we learned uniform-cost search, which finds the shortest path from one node to another in a labeled directed graph. Construct a labeled directed graph G from N, with one final state f, such that any path from the start state to f corresponds to a set of non-overlapping occurrences of words from S in w, and the cost of that path is 2n-m, where m is the number of letters of w used by the words from S. (Hint: Make G from n + 1 copies of N.) (c) Explain how, using uniform-cost search, we can find the optimal set of word occurrences. Note that UCS finds paths of minimum cost, while we want paths of maximum value.

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, danksans7011
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
image
Engineering, 04.07.2019 18:10, Strick1530
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
image
Engineering, 04.07.2019 19:10, justkevin1231
Which of the following is the most important advantage of a large field of view? a. allows larger areas to be examined b. relieves eyestrain c. minimizes parallax errors. d. increases precision in proportion to the in- crease in field of view
Answers: 2
image
Engineering, 04.07.2019 19:20, holaadios222lol
Apiping systems consists of 6 m of 6-std type k and 12 m of 4-std type k, both drawn copper tubing. the system conveys ethylene glycol at a rate of 0.013 m3/s. the pressure drop across the system is to be calculated. there are two 90° elbows in the 6-in pipe, a reduction from the 6-in pipe to the 4-in pipe and four 90° elbows in the 4-in pipe. all fittings are soldered (same as flanged) and regular. the inlet and outlet of the system are at the same height.
Answers: 1
Do you know the correct answer?
P14.7.9 Here is an optimization problem that we can solve with the aid of an ordinary NFA and anothe...

Questions in other subjects:

Konu
Mathematics, 02.01.2020 05:31