Finding simple path on grid graphs of length $l$

Let $ G$ be a grid graph and we are given two vertices $ s$ and $ t$ and $ l$ , the goal is to check if there exists a path from $ s$ to $ t$ simple path of length $ l$ ?

Brute force algorithm will give $ n^l$ time algorithm as I will simply enumerate all the paths of length $ l$ . Are there faster algorithms for this problem?

My observation is grid graphs are bipartite graphs so all paths will be either of odd length or even length but I don’t know how to use this fact. Note that in grid graphs the degree is bounded by four so from any vertice to any other vertex, number of paths of length $ l$ are bounded by $ 4^l$ . I am looking for an algorithm faster than $ 4^l$ .

Prove simple theorems in Haskell in automated way

I would like to prove in Haskell, whether in vanilla Haskell or using some libraries / tools, some simple theorems such as:

and [n*(n+1)/2 == sum [0..n] | n <- [0..]] 

Is there a simple enough (ie. fully automated) way to prove such theorems involving integers in Haskell? I am not really interested in the proof itself, or a counterexample, but merely a yes/no answer.

There’s this publication which doesn’t seem practically usable; other than that most of everything else seems to be rather complex, ie. involving a completely separate language and not concerning Haskell.

What does the phrase “Simple For Loops” mean in computability theory?

I was reading a Wikipedia page on Primitive Recursive Functions but there is a phrase for describing the simple for loops which I really don’t understand. Can anyone explain this to me?

The Phrase: An upper bound of the number of iterations of every loop can be determined before entering the loop

The Wikipedia page

Please explain me this question in very simple terms

Consider the following snapshot of a system running n processes. Process i is holding Xi instances of a resource R, 1 <= i <= n. currently, all instances of R are occupied. Further, for all i, process i has placed a request for an additional Yi instance while holding the Xi instances it already has. There are exactly two processes p and q such that Yp = Yq = 0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock? (A) min (Xp, Xq) < max (Yk) where k != p and k != q (B) Xp + Xq >= min (Yk) where k != p and k != q (C) max (Xp, Xq) > 1 (D) min (Xp, Xq) > 1

Can I use a spiked shield in my primary hand as a weapon? If so, does it count as a simple or martial weapon?

Can any humanoid PC use a Spiked Shield in their ‘primary hand’ as a Weapon?

and

Is it a Simple or Martial Weapon?

The Lizardfolk entry in the MM (p. 204) has a statblock that includes the following elements:

  • STR 15 (+2)
  • Armor Class 15 (natural armor, shield)
  • Multiattack. The lizardfolk makes two melee attacks, each one with a different weapon.
  • Spiked Shield. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6+2) piercing damage.

It also includes 3 other (Bite, Heavy Club, and Javelin) melee attack options, presumably for use with Multiattack.

I would like to use a Spiked Shield (1d6 + Str mod) in my ‘primary’ hand and leave my other hand empty. Is there anything in RAW that indicates the Spiked Shield is a weapon that is prohibited from PC usage in 5e?

The PHB (p. 147) has a section about improvised weapons:

An improvised weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead goblin. Often, an improvised weapon is similar to an actual weapon and can be treated as such.

If you look at the graphic of the lizardfolk in the MM you can clearly see a shield on its left arm made out of some kind of tortoise shell with two rather large spikes extruding forwards:

Monster Manual - Lizardfolk

It certainly looks like a weapon… so is it DM fiat as to whether it “is similar to an actual weapon?

The PHB (p. 146) has this to say about weapon proficiency:

Your race, class, and feats can grant you proficiency with certain weapons or categories of weapons. The two categories are simple and martial. Most people can use simple weapons with proficiency. These weapons include clubs, maces, and other weapons often found in the hands of commoners. Martial weapons, including swords, axes, and polearms, require more specialized training to use effectively.

This says that there are two categories – Simple and Martial. The question then is, would this spiked shield “require more specialized training to [be] use[d] effectively“?

When it comes to using the shield as an improvised weapon, it seems you retain the +2 to AC when you use it as an improvised weapon, according to this November 2014 tweet by Jeremy Crawford.

(Roll20) How to make a simple deck of magical cards that will be drawn randomly?

Sorry if the question was asked before, but i didnt find any good awnsers for me.

Im a new DM playing on Roll20 and im making a new Class that fights with magical cards,dice and coins. I need a deck of cards that you can drawn from, where all cards have different effects. But im not sure how to make it very efficient, because some cards in the deck are duplicates. Also, if you draw a card, its gone from the deck. But you should also be able to “reshuffle” the deck to put all cards back into the deck. I thought about making a rollable table on roll 20, but from what i know, you can’t make a setting to get an event only once before having to “reset” the table. Is there a better method than just writing all cards already drawn somewhere, and let the player roll the table until he gets a new card.

Thanks for your advice.