SlideShare uma empresa Scribd logo
1 de 2
Baixar para ler offline
O Xadrez é um jogo estratégico de tabuleiro para dois jogadores. O jogo é disputado em um
tabuleiro de 64 casas (8x8) alternadas entre claras e escuras. Cada jogador inicia a partida com
16 peças, sendo: 1 rei, 1 rainha, 2 bispos, 2 cavalos, 2 torres e 8 peões. O objetivo da partida é
capturar o rei inimigo. Para isso, um dos jogadores deve posicionar suas peças no tabuleiro de
forma que, na próxima jogada, ele consiga mover uma das peças para a casa ocupada pelo rei
inimigo, considerando o movimento particular de cada peça.
“Passeio do Cavalo”
Capítulo 1 – Descrição do Problema
Além do seu valor estratégico e lúdico, o xadrez também se mostra muito importante
no ponto de vista matemático e computacional. Diversos problemas de natureza combinatória
e topológica ligado ao xadrez são conhecidos, foram estudados nas últimas centenas de anos
e, mais recentemente, suas soluções foram aplicadas para resolução de vários problemas
computacionais. Esses problemas são chamados decomposições. Em uma composição o
problema é apresentado por meio da definição de uma distribuição de peças no tabuleiro e a
solução consiste em realizar uma ação determinada. É comum que a ação a ser realizada
venha acompanhada de uma ou mais restrições. Existem diversas composições clássicas no
xadrez. Uma delas é conhecida como o passeio do cavalo. Nessa composição o desafio é fazer
com que o cavalo passe por todas as casas do tabuleiro. Inicialmente o cavalo está em uma
casa qualquer e ele deve ser movimentado obedecendo às regras de movimentação para essa
peça.
Capítulo 2 – Descrição Textual dos Movimentos do Xadrez
Sistema de notação algébrica, ver Figura1, é um método usado hoje em todas as organizações
de competição de xadrez e a maioria dos livros e periódicos para registrar e descrever lances
de partidas de xadrez. A forma mais comum usada, e primariamente descrita aqui, é também
chamada de notação algébrica abreviada (ou curta) para distingui-la da notação algébrica
expandida (ou longa). Iniciada nos anos 1970, a notação algébrica abreviada acabou por
substituir anotação descritiva de xadrez, apesar de que essa notação ainda possa ser achada
na literatura mais antiga.
Sistema de notação algébrica
Após verificar as notações e rever o sistema de expressão regular, consegui terminar a mesma,
deixando no modo abaixo sendo possível realizar toda a notação algébrica.
^[R,D,B,C,T]*[a-h]*([a-h][0-7]#*){1}$
Capítulo 1 – Descrição do Problema.
O problema do cavalo, ou passeio do cavalo, é um problema matemático envolvendo o
movimento da peça do cavalo no tabuleiro de xadrez. O cavalo é colocado no tabuleiro vazio e,
seguindo as regras do jogo, precisa passar por todas as casas exatamente uma vez, ou seja,
movimentar o cavalo em “L” para que ele passe por todas as 64 casas do tabuleiro sem repetir
nenhuma.
Capítulo 2 – Descrição Textual dos Movimentos do Xadrez
Abaixo gramática regular que exemplifica uma sequência de movimento do cavalo em um
tabuleiro 8x8.
G=({S, C}, {a1,b1,c1,d1,e1,f1,g1,h1, a2,b2,c2,d2,e2,f2,g2,h2, a3,b3,c3,d3,e3,f3,g3,h3,
a4,b4,c4,d4,e4,f4,g4,h4, a5,b5,c5,d5,e5,f5,g5,h5, a6,b6,c6,d6,e6,f6,g6,h6,
a7,b7,c7,d7,e7,f7,g7,h7, a8,b8,c8,d8,e8,f8,g8,h8}, R, S) onde R:
S→C
C→e4; C→c3; C→g3; C→d2; C→f2; C→c5; C→g5, C→d6; C→f6
Figura 1- Tabuleiro de Xadrez
Figura 2 - Tabuleiro de xadrez após aplicação da gramática regular descrita acima
Abaixo gramática regular que exemplifica uma sequência de movimento do cavalo
completando o desafio “passeio do cavalo” em um tabuleiro 8x8.
G=({S, C}, {a1,b1,c1,d1,e1,f1,g1,h1, a2,b2,c2,d2,e2,f2,g2,h2, a3,b3,c3,d3,e3,f3,g3,h3,
a4,b4,c4,d4,e4,f4,g4,h4, a5,b5,c5,d5,e5,f5,g5,h5, a6,b6,c6,d6,e6,f6,g6,h6,
a7,b7,c7,d7,e7,f7,g7,h7, a8,b8,c8,d8,e8,f8,g8,h8}, R, S) onde R:
S→C
C→a8, C→b6, C→d7, C→c5, C→a4, C→b2, C→d1, C→c3, C→e4, C→f2, C→h1, C→g3, C→h5,
C→g7, C→e6, C→f8, C→g6, C→h8, C→f7, C→e5, C→g4, C→h2, C→f1, C→e3, C→c4, C→d2,
C→b1, C→a3, C→b5, C→a7, C→c8, C→d6, C→e8, C→f6, C→h7, C→g5, C→h3, C→g1, C→e2,
C→f4, C→d3, C→c1, C→a2, C→b4, C→d5, C→c7, C→a6, C→b8, C→c6, C→d8, C→b7, C→a5,
C→b3, C→a1, C→c2, C→d4, C→f3, C→e1, C→g2, C→h4, C→f5, C→e7, C→g8, C→h6
Capítulo 3 – Reconhecimento da Entrada

Mais conteúdo relacionado

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Atps respostas linguagem formais e automatos

  • 1. O Xadrez é um jogo estratégico de tabuleiro para dois jogadores. O jogo é disputado em um tabuleiro de 64 casas (8x8) alternadas entre claras e escuras. Cada jogador inicia a partida com 16 peças, sendo: 1 rei, 1 rainha, 2 bispos, 2 cavalos, 2 torres e 8 peões. O objetivo da partida é capturar o rei inimigo. Para isso, um dos jogadores deve posicionar suas peças no tabuleiro de forma que, na próxima jogada, ele consiga mover uma das peças para a casa ocupada pelo rei inimigo, considerando o movimento particular de cada peça. “Passeio do Cavalo” Capítulo 1 – Descrição do Problema Além do seu valor estratégico e lúdico, o xadrez também se mostra muito importante no ponto de vista matemático e computacional. Diversos problemas de natureza combinatória e topológica ligado ao xadrez são conhecidos, foram estudados nas últimas centenas de anos e, mais recentemente, suas soluções foram aplicadas para resolução de vários problemas computacionais. Esses problemas são chamados decomposições. Em uma composição o problema é apresentado por meio da definição de uma distribuição de peças no tabuleiro e a solução consiste em realizar uma ação determinada. É comum que a ação a ser realizada venha acompanhada de uma ou mais restrições. Existem diversas composições clássicas no xadrez. Uma delas é conhecida como o passeio do cavalo. Nessa composição o desafio é fazer com que o cavalo passe por todas as casas do tabuleiro. Inicialmente o cavalo está em uma casa qualquer e ele deve ser movimentado obedecendo às regras de movimentação para essa peça. Capítulo 2 – Descrição Textual dos Movimentos do Xadrez Sistema de notação algébrica, ver Figura1, é um método usado hoje em todas as organizações de competição de xadrez e a maioria dos livros e periódicos para registrar e descrever lances de partidas de xadrez. A forma mais comum usada, e primariamente descrita aqui, é também chamada de notação algébrica abreviada (ou curta) para distingui-la da notação algébrica expandida (ou longa). Iniciada nos anos 1970, a notação algébrica abreviada acabou por substituir anotação descritiva de xadrez, apesar de que essa notação ainda possa ser achada na literatura mais antiga. Sistema de notação algébrica Após verificar as notações e rever o sistema de expressão regular, consegui terminar a mesma, deixando no modo abaixo sendo possível realizar toda a notação algébrica. ^[R,D,B,C,T]*[a-h]*([a-h][0-7]#*){1}$
  • 2. Capítulo 1 – Descrição do Problema. O problema do cavalo, ou passeio do cavalo, é um problema matemático envolvendo o movimento da peça do cavalo no tabuleiro de xadrez. O cavalo é colocado no tabuleiro vazio e, seguindo as regras do jogo, precisa passar por todas as casas exatamente uma vez, ou seja, movimentar o cavalo em “L” para que ele passe por todas as 64 casas do tabuleiro sem repetir nenhuma. Capítulo 2 – Descrição Textual dos Movimentos do Xadrez Abaixo gramática regular que exemplifica uma sequência de movimento do cavalo em um tabuleiro 8x8. G=({S, C}, {a1,b1,c1,d1,e1,f1,g1,h1, a2,b2,c2,d2,e2,f2,g2,h2, a3,b3,c3,d3,e3,f3,g3,h3, a4,b4,c4,d4,e4,f4,g4,h4, a5,b5,c5,d5,e5,f5,g5,h5, a6,b6,c6,d6,e6,f6,g6,h6, a7,b7,c7,d7,e7,f7,g7,h7, a8,b8,c8,d8,e8,f8,g8,h8}, R, S) onde R: S→C C→e4; C→c3; C→g3; C→d2; C→f2; C→c5; C→g5, C→d6; C→f6 Figura 1- Tabuleiro de Xadrez Figura 2 - Tabuleiro de xadrez após aplicação da gramática regular descrita acima Abaixo gramática regular que exemplifica uma sequência de movimento do cavalo completando o desafio “passeio do cavalo” em um tabuleiro 8x8. G=({S, C}, {a1,b1,c1,d1,e1,f1,g1,h1, a2,b2,c2,d2,e2,f2,g2,h2, a3,b3,c3,d3,e3,f3,g3,h3, a4,b4,c4,d4,e4,f4,g4,h4, a5,b5,c5,d5,e5,f5,g5,h5, a6,b6,c6,d6,e6,f6,g6,h6, a7,b7,c7,d7,e7,f7,g7,h7, a8,b8,c8,d8,e8,f8,g8,h8}, R, S) onde R: S→C C→a8, C→b6, C→d7, C→c5, C→a4, C→b2, C→d1, C→c3, C→e4, C→f2, C→h1, C→g3, C→h5, C→g7, C→e6, C→f8, C→g6, C→h8, C→f7, C→e5, C→g4, C→h2, C→f1, C→e3, C→c4, C→d2, C→b1, C→a3, C→b5, C→a7, C→c8, C→d6, C→e8, C→f6, C→h7, C→g5, C→h3, C→g1, C→e2, C→f4, C→d3, C→c1, C→a2, C→b4, C→d5, C→c7, C→a6, C→b8, C→c6, C→d8, C→b7, C→a5, C→b3, C→a1, C→c2, C→d4, C→f3, C→e1, C→g2, C→h4, C→f5, C→e7, C→g8, C→h6 Capítulo 3 – Reconhecimento da Entrada