Главная страница


ru.algorithms

 
 - RU.ALGORITHMS ----------------------------------------------------------------
 From : Serge Nozhenko                       2:5020/175.1   06 Dec 2002  04:50:32
 To : Borodin Anatoly
 Subject : Exercise from Cormen
 -------------------------------------------------------------------------------- 
 
 
  BA> Pardon!!! При внимательном изучении условия видно, что фигура не
  BA> пересекает саму себя :((( И пятиконечная звезда тоже не проходит
 
   Hет там такого условия (что данные точки заведомо являются
 несамопересекающимся многоугольником). Вот оригинал: "Professor Amundsen
 proposes the following method to determine whether a sequence (p0, p1, . . . ,
 pn-1) of n points forms the consecutive vertices of a convex polygon. Output
 "yes" if the set {angle(pi, pi+1, pi+2): i = 0, 1, . . . ., n - 1}, where
 subscript addition is performed modulo n, does not contain both left turns and
 right turns; otherwise output "no". Show that although this method runs in
 linear time, it does not always produce the correct answer. Modify the
 professor'r method so that it always produces the correct answer in linear
 time."
   Так что в качестве контрпримера подходит даже ((1,1), (2,2), (3,3)) :)
 
  Serge
 
 --- Golded 2.41+
  * Origin: Moccoletto (2:5020/175.1)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Exercise from Cormen   Yurij Zabelyshynskij   05 Dec 2002 20:50:02 
 Re: Exercise from Cormen   Borodin Anatoly   06 Dec 2002 00:07:50 
 Re: Exercise from Cormen   Borodin Anatoly   06 Dec 2002 00:11:22 
 Re: Exercise from Cormen   Yurij Zabelyshynskij   06 Dec 2002 01:33:42 
 Re: Exercise from Cormen   Borodin Anatoly   06 Dec 2002 01:58:57 
 Re: Exercise from Cormen   Borodin Anatoly   06 Dec 2002 02:01:30 
 Exercise from Cormen   Serge Nozhenko   06 Dec 2002 04:50:32 
 Re: Exercise from Cormen   Yurij Zabelyshynskij   06 Dec 2002 18:45:01 
 Exercise from Cormen   Anton Kuznetsov   06 Dec 2002 00:18:00 
 Re: Exercise from Cormen   Yurij Zabelyshynskij   06 Dec 2002 18:16:38 
 Exercise from Cormen   Anton Kuznetsov   06 Dec 2002 21:11:00 
 Re: Exercise from Cormen   Andrey Tarasevich   07 Dec 2002 12:36:30 
 Re: Exercise from Cormen   Aleksey Samohvalov   10 Dec 2002 23:43:39 
 Re: Exercise from Cormen   Yurij Zabelyshynskij   12 Dec 2002 17:58:35 
 Exercise from Cormen   Max Alekseyev   13 Dec 2002 20:35:12 
 Re: Exercise from Cormen   Yurij Zabelyshynskij   15 Dec 2002 00:32:42 
Архивное /ru.algorithms/32893df020c0.html, оценка 1 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional