English 中文(简体)
我怎样才能为十进制数字构建一个有限的自动图?
原标题:How can I construct a finite automaton for even decimal numbers?

我必须做这个练习,并且完全无法了解如何操作。我以前建了一些FAS,但使用了二进制数字。我怎么能这样做呢?哪怕是十进制数字,我也不能这样做?

问题回答

它会是一个简单的。

2 说: q1, q2。

  • q1 is initial state.
  • q2 is final state.
  • if input digit on q1 is any even digit, make a move to q2.
  • if input digit on q1 is any odd digit, remain on q1.
  • if input digit on q2 is any even digit, remain on q2.
  • if input digit on q2 is any odd digit, make a move back to q1.




相关问题
Question on converting decimal to binary to hex [closed]

I m a little confused here: I m trying to reverse engineer the ASCII value 65. In the book I am reading it says: Decimal: 65 Hex: 41 Octal: 101 But 65 in its binary representation is: 0010 0001 ...

Decimal Cut problem

Is it possible to cut decimal, and not round it. Like this. decimal number = 12.159m; How can I easily get 12.15 from number and not 12.16? Is there an easy way or is the string manipulation the ...

SQL Decimal Issue

I have an input string in the following format: 12.34 When I call this line: db.AddInParameter(insertMessageDetailCommand, "AttachmentSize", System.Data.SqlDbType.Decimal , Convert.ToDecimal(this....

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

热门标签