Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.fds-net.ru/showflat.php?Number=9960005&src=arc&showlite=
Дата изменения: Unknown
Дата индексирования: Tue Apr 12 23:15:11 2016
Кодировка: Windows-1251
головоломка - Public forum of MSU united student networks
Root | Google | Yandex | Mail.ru | Kommersant | Afisha | LAN Support
  
General Discussion >> Study (Archive)

Страницы: 1
tushkan

Рег.: 14.01.2006
Сообщений: 397
Рейтинг: 1877
  головоломка
      16.01.2011 04:20
30

картинка взята с лепры, оригинал тут:
http://faculty.uml.edu/jpropp/srat.html




Редактировал tushkan (16.01.2011 04:51)
Loks
папаня

Рег.: 04.10.2003
Сообщений: 10000
Из: CA, USA
Рейтинг: 2707
  Re: головоломка [re: tushkan]
      16.01.2011 11:32
-2

Странный пазл. Даже при "правильном" расставлении всех буковок, в некоторых клетках (не только в 19й) существуют и другие правильные ответы (но они противоречат остальной картине). По моему это не совсем корректно :(

Antoir_
addict

Рег.: 07.11.2010
Сообщений: 605
Рейтинг: 616
  Re: головоломка [re: Loks]
      16.01.2011 12:38
 

В ответ на:

По моему это не совсем корректно



корректно - ведь задача "найти всевохможные наборы ответов , так чтоб в целом не было противоречия"

Vilfred_Sagen
спать хочу

Рег.: 29.10.2004
Сообщений: 22313
Из: moscow
Рейтинг: 7124
  Re: головоломка [re: tushkan]
      17.01.2011 03:28
3

"баттхерт проваливших ЕГЭ?" (с)

Vanson
Вансон

Рег.: 02.07.2007
Сообщений: 4989
Рейтинг: 1231
  Re: головоломка [re: Loks]
      18.01.2011 00:50
 

В ответ на:

другие правильные ответы (но они противоречат остальной картине)



  Так бы сразу и сказал, что не знаешь.

Thirteen

Рег.: 28.02.2005
Сообщений: 10081
Рейтинг: 6748
  Re: головоломка [re: tushkan]
      18.01.2011 03:13
 

в последней ячейке неправильный перевод :crazy:



улыбаемся и машем
tushkan

Рег.: 14.01.2006
Сообщений: 397
Рейтинг: 1877
  Re: головоломка [re: tushkan]
      18.01.2011 18:32
2

вот эта задачка больше понравилась:

Below are ten statements concerning X, a whole number between 1 and 10
(inclusive). Not all of the statements are true, but not all of them
are false either. What number is X?

1. X equals the sum of the statement numbers of the false statements in
this list.

2. X is less than the number of false statements in this list, and
statement 10 is true.

3. There are exactly three true statements in this list, or statement 1
is false, but not both.

4. The previous three statements are all false, or statement 9 is true,
or both.

5. Either X is odd, or statement 7 is true, but not both.

6. Exactly two of the odd-numbered statements are false.

7. X is the number of a true statement.

8. The even-numbered statements are either all true or all false.

9. X equals three times the statement number of the first true statement
in this list, or statement 4 is false, or both.

10. X is even, or statement 6 is true, or both.

MeGa
Vitek

Рег.: 20.09.2003
Сообщений: 10782
Из: NJ
Рейтинг: 882
  Re: головоломка [re: tushkan]
      19.01.2011 18:01
 

какое решение ?

MeGa
Vitek

Рег.: 20.09.2003
Сообщений: 10782
Из: NJ
Рейтинг: 882
  Re: головоломка [re: MeGa]
      19.01.2011 18:20
 

ок гугл помог, программка выглядит так:

Когда решал сам понимал вопрос 7 как "number of a true statements" - число верных утверждений.

 
code:
def matches(true_false, conditional): if true_false: return conditional else: return not conditional def xor(a, b): return (a or b) and (not a or not b) def all_vals(): for v in all_vals_helper(n=10): yield [None] + v def all_vals_helper(n): if n == 1: yield [True] yield [False] else: for sub in all_vals_helper(n=n-1): yield [True] + sub yield [False] + sub def print_answer(X, vals): print 'Number: %i' % X for i in range(1, 11): print '%2i) %s' % (i, vals[i]) for X in range(1, 11): for vals in all_vals(): total_true = 0 total_false = 0 for i in range(1, 11): if vals[i]: total_true += 1 else: total_false += 1 # 1) X equals the sum of the statement numbers of the false statements in # this list. total = 0 for n in range(1, 11): if vals[n]: total += n if not matches(vals[1], X == n): continue # 2) X is less than the number of false statements in this list, and # statement 10 is true. total = 0 if not matches(vals[2], X < total_false and vals[10]): continue # 3) There are exactly three true statements in this list, or statement 1 # is false, but not both. if not matches(vals[3], xor(total_true == 3, not vals[1])): continue # 4) The previous three statements are all false, or statement 9 is true, # or both. if not matches(vals[4], (not vals[1] and not vals[2] and not vals[3]) or vals[9]): continue # 5) Either X is odd, or statement 7 is true, but not both. if not matches(vals[5], xor(X % 2, vals[7])): continue # 6) Exactly two of the odd-numbered statements are false. total_odd_false = 0 for n in range(1, 11, 2): if not vals[n]: total_odd_false += 1 if not matches(vals[6], total_odd_false == 2): continue # 7) X is the number of a true statement. if not matches(vals[7], X == total_true): continue # 8) The even-numbered statements are either all true or all false. all_true = True all_false = True for n in range(2, 11, 2): all_true = all_true and vals[n] all_false = all_false and not vals[n] if not matches(vals[8], all_true or all_false): continue # 9) X equals three times the statement number of the first true statement in # this list, or statement 4 is false, or both. for n in range(1, 11): if vals[n]: break else: assert 0, "None are true" if not matches(vals[9], X == n * 3 or not vals[4]): continue # 10) X is even, or statement 6 is true, or both. if not matches(vals[10], not X % 2 or vals[6]): continue print_answer(X, vals)


Страницы: 1

General Discussion >> Study (Archive)

Дополнительная информация
3 зарегистрированных и 0 анонимных пользователей просматривают этот форум.

Модераторы:  Basilio, The_Nameless_One 

Печать темы

Права
      Вы можете создавать новые темы
      Вы можете отвечать на сообщения
      HTML отключен
      UBBCode включен

Рейтинг:
Просмотров темы:

Переход в