CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - ai
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Compress-Decompress algrithms
STL
Data structs
Algorithm
AI-NN-PR
matlab
Bio-Recognize
Crypt_Decrypt algrithms
mathematica
Maple
DataMining
Big Data
comsol
physical calculation
chemical calculation
simulation modeling
Search - ai - List
[
Data structs
]
传教士与野人问题
DL : 0
传教士和野人问题是人工智能中的经典问题。本程序采用递归算法求解。定义一个函数,该函数返回一个解路径,路径可以用规则序列表示,也可以用状态序列表示。比如,用规则序列表示,可以表示为:(1 1)(1 0)。。。 表示:过去1个传教士,一个野人,回来一个传教士,。。。如果用状态序列表示,可以表示为:(3 3 1)(2 2 0)(3 2 )。。。 路径用一个链表表示,该函数返回该链表。在main中调用该函数,并打印输出该路径。-missionaries and Savage is a classic AI problem. The program uses a recursive algorithm. Definition of a function, the function returns a solution path, the road rules sequences can be used, said the state can also use the sequence indicated. For example, the sequence with rules that can be expressed as : (1) (1 0). . . Said : In the past, a missionary, a Savage, a return missionaries. . . If the state sequence that can be expressed as : (3 3 1) (2 2 0) (3). . . Path with a linked list, the function returns the List. In a call to the main function, and print output of the path.
Date
: 2026-01-10
Size
: 33kb
User
:
罗鹏魁
[
Data structs
]
JuZhenLianCheng
DL : 0
问题描述 给定n个矩阵A1,A2,…,An,其中,Ai与Aj+1是可乘的,i=1,2,…,n-1。 你的任务是要确定矩阵连乘的运算次序,使计算这n个矩阵的连乘积A1A2…An时总的元素乘法次数达到最少。 例如:3个矩阵A1,A2,A3,阶分别为10×100、100×5、5×50,计算连乘积A1A2A3时按(A1A2)A3所需的元素乘法次数达到最少,为7500次。 -Description of the problem given n matrices A1, A2, ..., An, which, Ai and Aj+ 1 is the multiplicative, i = 1,2, ..., n-1. Your mission is to identify the matrix even by computing the order, so that calculation of this n-matrix product A1A2 ... An even when the total number of elements to achieve a minimum of multiplication. For example: three matrices A1, A2, A3, bands were 10 × 100,100 × 5,5 × 50, the calculation even when the product A1A2A3 by (A1A2) A3 multiply the number of elements required to achieve at least for the 7500 meeting.
Date
: 2026-01-10
Size
: 6kb
User
:
陈文浩
[
Data structs
]
TSPSA
DL : 0
TSPSA by AI of Simulated Annealing-TSPSA by AI of Simulated Annealing
Date
: 2026-01-10
Size
: 19kb
User
:
liyiyang
[
Data structs
]
list
DL : 0
本实训是有关线性表的顺序存储结构的应用,在本实训的实例程序中,通过C语言中提供的数组来存储两个已知的线性表,然后利用数组元素的下标来对线性表进行比较。通过对本实训的学习,可以理解线性表在顺序存储结构下的操作方法。 在实训中,我们设A=(a1,a2,…,an)和B=(b1,b2,…,bm)是两个线性表,其数据元素的类型是整型。若n=m,且ai=bi,则称A=B 若ai=bi,而aj<bj,则称A<B;除此以外,均称A>B。设计一比较大小的程序。 -Training is related to the linear form the structure of the order of storage applications, in this example of practical training program, through the C language to provide an array to store the two known linear form, and then use the array element subscript to comparison of the linear form. Through the Training of the study, the linear form can be understood in the order of the storage structure of the operation. In Training, we set A = (a1, a2, ..., an) and B = (b1, b2, ..., bm) are two linear forms, the data elements of type integer. If n = m, and ai = bi, say A = B if ai = bi, and aj
Date
: 2026-01-10
Size
: 4kb
User
:
王阿川
[
Data structs
]
queens
DL : 0
prolog语言写的一个八皇后问题,程序比较简单,有注释-prolog language to write an eight-queen problem, the procedure is relatively simple, has the Notes
Date
: 2026-01-10
Size
: 1kb
User
:
张言国
[
Data structs
]
shuanfa3
DL : 0
(1) 用一个4*20的二维数组M,第1行存放按从小到大排序的20个所给出的ai和bi,第2行存放相应的作业序号,第3行存放1或2(1代表是来自ai,2代表是来自bi), 第4行存放0或1(0代表作业序号未进入最优调度方案;1代表作业序号已进入最优调度方案) (2) 排序完后,按课本所述方法求一种最优调度方案,存放在S中。 -(1) with a 4* 20 two-dimensional array M, the first a line to deposit a small to large order of 20 given by ai and bi, line 2 store operation corresponding serial number, the first three lines deposited one or 2 (a representative from the ai, 2 representatives from the bi), the first four rows stored 0 or 1 (0 for job number to gain access to optimal scheduling programs a job number has been entered on behalf of the optimal scheduling scheme) ( 2) Sort exhausted, according to the methods described in textbooks, seeking the optimal scheduling of a program stored in the S in.
Date
: 2026-01-10
Size
: 843kb
User
:
lixiang
[
Data structs
]
AI
DL : 0
八数码求解问题,八数码问题是人工智能经典难题之一。 主要运用A*算法求解,代码完整,清晰-eight puzzle
Date
: 2026-01-10
Size
: 1.02mb
User
:
Sun
[
Data structs
]
eight-puzzle
DL : 0
人工智能八数码的A*算法实现。 编译运行说明: 1.若编译成功却不能运行,请修改工程的设置 (Project\Setttings\Debug子项) 2.改变程序中MaxItem的值(本程序中MaxItem等于3) 和相关的输入用对话框,则可以计算MaxItem*MaxItem-1 数码问题-AI A* Eight digital algorithm. Compile and run: 1. If the compiler can not run successfully, modify the project settings (Project \ Setttings \ Debug child) 2. MaxItem change the value of the program (this program MaxItem equal to 3) and the related input with a dialog box , you can calculate MaxItem* MaxItem-1 digital issues
Date
: 2026-01-10
Size
: 205kb
User
:
[
Data structs
]
1
DL : 0
网上看到的,自己修改了一下,是关于AI中的传教士野人问题的链表实验的C语言版本的。希望大家分享吧-Online to see that he changes a little, is a wild man on the problem of AI in the list of missionaries of the C language version of the experiment. Want to share it 朗读显示对应的拉丁字符的拼音
Date
: 2026-01-10
Size
: 2kb
User
:
杨焱煜
[
Data structs
]
dynamic-planning
DL : 0
给定n个矩阵{A1,A2,…,An},其中Ai与Ai+1是可乘的,i=1,2,…,n-1。考察这n个矩阵的连乘积A1A2…An。由于矩阵乘法满足结合律,故计算矩阵的连乘积可以有许多不同的计算次序,这种计算次序可以用加括号的方式来确定。-Given n matrices {A1, A2, ..., An}, where Ai and Ai+1 is a mere of, i = 1,2, ..., n-1. Study the n matrix with the product A1A2 ... An. Since matrix multiplication to meet with law, so the calculation of the matrix with the product can have many different ways to calculate the order, the order of this calculation can be used to determine the way in parentheses.
Date
: 2026-01-10
Size
: 1kb
User
:
庞存岐
[
Data structs
]
statistical-problem
DL : 0
Description: 计算机似乎生来就是干苦力的,不是吗?统计就是这种苦力中的一种,而如果你运气不好,刚好碰到有很多重复数据的时候,就更加令人感到乏味。那么,你的任务来了。现在,给你一列数 A1, A2, … An 。然后要你回答,对于给定的区间,里面到底有多少个不重复的数。 Input: 一个整数 T (T <= 10) ,表示有 T 组测试数据。 每组数据第一行是数 N (1 <= N <= 30000) 。 第二行有 N 个数 A1 A2 … An (0 <= Ai <= 2^31 - 1) 。 第三行是数 Q (1 <= Q <= 100000) 。 接下来 Q 行是 Q 个询问 X Y (1 <= x <= y <= N) 。 Output: 对于每个询问,输出一个答案,一个答案占一行。 Sample Input: 2 3 1 1 4 2 1 2 2 3 5 1 1 2 1 3 3 1 5 2 4 3 5 Sample Output: 1 2 3 2 3 Source: y-Think: The computer, which seems to do the coolie was born, isn t it? Statistics is one of the the workhorses, and if you are unlucky, just come up against many repeating data, more people feel boring. So, your task. Now, give you a list of several A1, A2,... An. Then will you answer, for a given interval, exactly how many don t repeat number. Input: An integer T (T < = 10), said a T test data. Each group of data is the first line number N (1 < = N < = 30000). The second line have N number A1 A2... An (0 < = Ai < = 2 ^ 31-1).The third line is a number (1 Q < = Q < = 100000). The next line is a Q Q ask X Y (1 < = X < = Y < = N). Output: For each inquiry, the output one answer, an answer of a line. Sample Input: 2 3 1 1 4 2 1 2 2 3 5 1 1 2 1 3 3 1 of 5 2 4 3 5 Sample Output: 1 2 3 2 3 Returned: ycc
Date
: 2026-01-10
Size
: 9kb
User
:
沙魄郎君
[
Data structs
]
6277509aluo1
DL : 0
某旅馆有n个等级的房间,第i等级有ai个房间,每个等级有bi床位(1≤i≤n)。试模拟旅馆管理系统中床位分配和回收的功能,设计能为单个旅客分配床位,在其离店便回收床位(供下次分配)的算法。-failed to translate
Date
: 2026-01-10
Size
: 99kb
User
:
xian
[
Data structs
]
c3
DL : 0
组合问题 问题描述:找出从自然数1,2,…,n中任取r个数的所有组合。 采用回溯法找问题的解,将找到的组合以从小到大顺序存于a[0],a[1],…,a[r-1]中,组合的元素满足以下性质: (1) a[i+1]>a,后一个数字比前一个大; (2) a-i<=n-r+1。 -Combinatorial problems Problem Description: Find out from the natural numbers 1,2, ..., n r the number of either taking all the combinations. Problem using backtracking to find the solution, will find a combination of small to large order to save on a [0], a [1], ..., a [r-1], the combination of elements to meet the following properties: (1) a [i+1]> a, after a large number than the previous one (2) ai < = n-r+1.
Date
: 2026-01-10
Size
: 1kb
User
:
明达
[
Data structs
]
ADSF
DL : 0
给定n个矩阵A1,A2,…,An,其中,Ai与Aj+1是可乘的,i=1,2,…,n-1。 你的任务是要确定矩阵连乘的运算次序,使计算这n个矩阵的连乘积A1A2…An时总的元素乘法次数达到最少。 例如:3个矩阵A1,A2,A3,阶分别为10×100、100×5、5×50,计算连乘积A1A2A3时按(A1A2)A3所需的元素乘法次数达到最少,为7500次。 -Given n matrices A1, A2, ..., An, which, Ai and Aj+1 is a mere of, i = 1,2, ..., n-1. Your task is to determine the matrix multiplication operation with the order, the computation of the n matrix product A1A2 ... An even when the multiplication of the total number of elements to a minimum. For example: three matrices A1, A2, A3, bands were 10 × 100,100 × 5,5 × 50, the product A1A2A3 even when calculated according to (A1A2) A3 multiplication of the number of elements required to achieve at least for 7500.
Date
: 2026-01-10
Size
: 5kb
User
:
杨思翔
[
Data structs
]
Intelligence
DL : 0
Some interesting algorithm form AI(artificial intelligence)
Date
: 2026-01-10
Size
: 37kb
User
:
Marek
[
Data structs
]
GreedySelector
DL : 0
greedy selector algorithm, (AI) implementation
Date
: 2026-01-10
Size
: 10.33mb
User
:
Sahil
[
Data structs
]
AI-project-go_pass_river
DL : 0
经典AI案例《野人与传教士过河问题》,通过建立简约且完备的数学模型,采用顺序检索遍历所有节点,找出最终解决方案。-Classic AI case "savage and preachers across the river", through the establishment of the contracted and complete mathematical model, the order of retrieval traverse all nodes, and find out the final solution.
Date
: 2026-01-10
Size
: 1kb
User
:
liuyuan
[
Data structs
]
9
DL : 0
任意给定输入的一个小写英文字符串a1a2a3…an-1an (n≥5) 输出:字符串Ana1An-1a2An-2a3…A2an-1A1an,其中Ai为ai的大写形式 例如,输入aybdx,则递归程序输出XaDyBbYdAx -Any given input of a lowercase string a1a2a3 ... an-1an (n ≥ 5) Output: the string Ana1An-1a2An-2a3 A2an-1A1an, which Ai ai uppercase for example, input aybdx recursive program output XaDyBbYdAx
Date
: 2026-01-10
Size
: 2.12mb
User
:
t
[
Data structs
]
FindpathSourceCode
DL : 0
学习数据结构和算法的练习,使用栈结构对最终通路进行保存,"[Game AI]-[基础寻路走迷宫]-[数据结构栈Stack应用]" -Learning exercises data structures and algorithms, using the stack structure of the ultimate access to save, " [Game AI]- [based pathfinding Maze]- [Stack data structure stack applications]"
Date
: 2026-01-10
Size
: 1.81mb
User
:
王连
[
Data structs
]
majo
DL : 0
给定含有n 个元素的多重集合S = {a1, a2,., an } ,1 ≤ ai ≤ n ,1 ≤ i ≤ n ,每个元素在S 中出现的次数称为该元素的重数。多重集S 中重数大于n/2 的元素称为主元素。例如,S={2,2,4,2,1,2,5,2,2,8}。多重集S 的主元素是2,其重数为6。-Given n elements containing multiple collection S = (a1, a2,., An), 1 ≤ ai ≤ n, 1 ≤ i ≤ n, each element appearing in the number of S is called the multiplicity of elements. S multiple sets of weight more than n/2 elements as the main element. For example, S = (2,2,4,2,1,2,5,2,2,8). Multiple sets of the main elements of S is 2, its multiplicity is 6.
Date
: 2026-01-10
Size
: 1kb
User
:
杰克
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.