Data Structure && Algorithm
一个处理逻辑表达式的java程序
摘要: 前两天写了一个处理逻辑表达式的小程序,可以用来处理专家系统实事等逻辑关系表达式。
阅读全文
posted @
2008-02-26 19:05 wqwqwqwqwq 阅读(2577) |
评论 (2) 编辑
classcial dialogue about Rule Engine_Rete...
摘要: Have you read Jess In Action by Earnest J. Freedman-Hill? It's one of the better books out there on rule engines, though it does require some experience to get the most out of the book.
A variation on the bookstore could be recommendation engine. That would provide an opportunity to use a rule engine for direct matching on category/subcategory and aggregations.
阅读全文
posted @
2007-11-29 10:42 wqwqwqwqwq 阅读(970) |
评论 (5) 编辑
Trace Iamge
摘要: Given a picture composed entirely of horizontal and vertical line segments, calculate the minimum number of times you must lift your pen to trace every line segment in the picture exactly n times.
Each line segment will be of the form "
" (quotes for clarity), representing a segment from (x1,y1) to (x2,y2). Segments may cross each other. Segments may also overlap, in which case you should count the overlapping region as appearing in the drawing only once. For example, say t 阅读全文
posted @
2007-10-30 21:36 wqwqwqwqwq 阅读(1183) |
评论 (0) 编辑
Lottery Again
摘要: In most states, gamblers can choose from a wide variety of different lottery games. The rules of a lottery are defined by two integers (choices and blanks) and two boolean variables (sorted and unique). choices represents the highest valid number that you may use on your lottery ticket. (All integers between 1 and choices, inclusive, are valid and can appear on your ticket.) blanks represents the number of spots on your ticket where numbers can be written.
阅读全文
posted @
2007-10-24 21:20 wqwqwqwqwq 阅读(1202) |
评论 (1) 编辑
A Q of Encrypting String
摘要:
Let's say you have a binary string such as the following:
011100011
One way to encrypt this string is to add to each digit the sum of its adjacent digits. For example, the above string would become:
123210122
阅读全文
posted @
2007-10-23 13:34 wqwqwqwqwq 阅读(1050) |
评论 (1) 编辑
Maze Problem
摘要: People enjoy mazes, but they also get them dirty. Arrows, graffiti, and chewing gum are just a few of the souvenirs people leave on the walls. You, the maze keeper, are assigned to whiten the maze walls. Each face of the wall requires one liter of paint, but you are only required to paint visible faces. You are given a map of the maze, and you must determine the amount of paint needed for the job.
阅读全文
posted @
2007-10-21 21:28 wqwqwqwqwq 阅读(1457) |
评论 (1) 编辑
TopCoder_2
摘要: In written languages, some symbols may appear more often than others. Expected frequency tables have been defined for many languages. For each symbol in a language, a frequency table will contain its expected percentage in a typical passage written in that language. For example, if the symbol "a" has an expected percentage of 5, then 5% of the letters in a typical passage will be "a". If a passage contains 350 letters, then 'a' has an expected count of 17.5 for that passage (17.5 = 350 * 5%). Pl
阅读全文
posted @
2007-10-21 20:14 wqwqwqwqwq 阅读(913) |
评论 (1) 编辑
TopCoder_1
摘要: A speed radar is installed in a highway zone where the maximum speed limit is maxLimit mph, and the minimum speed limit is minLimit mph.
阅读全文
posted @
2007-10-20 13:25 wqwqwqwqwq 阅读(1258) |
评论 (1) 编辑
拐点提取法在曲线拟合中的简单应用
摘要: 本程序为优化,比较好的方法是,进行曲线积分,算误差比进行方程约束,由于时间比较少,稍候会给出优化程序。
阅读全文
posted @
2007-08-14 17:27 wqwqwqwqwq 阅读(1001) |
评论 (0) 编辑
Stack Simple implement
摘要: A simple implement of own stack
阅读全文
posted @
2007-08-03 18:14 wqwqwqwqwq 阅读(992) |
评论 (0) 编辑
To find a max segment in a array which includes negative and positive no.
摘要: To find a max segment in a array which includes negative and positive no.There r several methods to solve this question.
阅读全文
posted @
2007-07-31 12:45 wqwqwqwqwq 阅读(839) |
评论 (0) 编辑
求任意正整数的阶乘
posted @
2006-07-22 17:21 wqwqwqwqwq 阅读(2056) |
评论 (2) 编辑