如何在prolog中由用户定义图形 [英] how to define a graph by user in prolog

查看:58
本文介绍了如何在prolog中由用户定义图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨......我正在编写一个程序来在图表中找到一个非循环路径(图表应该由运行程序的人定义......)

我知道算法是在互联网上,但我不知道如何在这样的prolog中定义图形:

g([Vertex,...],[e(Vertex1,Vertex3),... ])

我找到了一些链接,但最后我不明白该怎么办....

我是prolog的初学者和它很难用另一种方式来思考... plz帮助我!

Hi ...I''m writing a program to find an acyclic_path in a graph (the graph should be define by a person who runs the program...)
I know that the algorithm is in internet but I don''t know how can I define a graph in prolog like this :
g([Vertex, ...],[e(Vertex1,Vertex3), ...])
I''ve found some links but at last I didn''t understand what to do....
I''m a begginer in prolog and it''s so hard to think in another way of programmin...plz help me!

推荐答案

我想这就是全部,你需要:https://sites.google.com/site/prologsite/prolog-problems/6 [ ^ ]
I think here is all, that you need: https://sites.google.com/site/prologsite/prolog-problems/6[^]


这篇关于如何在prolog中由用户定义图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆