Does a ranged attack around a corner incur cover penalties?

In case A attacks B with a ranged attack, does B get cover?

enter image description here

I ask because it seems to me that he might not. In the image above I assumed that A has chosen the upper right corner of his square as being the most favorable for his ranged attack.

To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target’s square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC). (PHB p. 150)

The question is whether the line that runs left along the wall provides cover.

But A surely has cover from B’s melee attacks.

When making a melee attack against an adjacent target, your target has cover if any line from your square to the target’s square goes through a wall (including a low wall). (PHB p.151)

If you draw lines from the bottom left corner of B’s square you certainly cross the walls, so A definetively has cover from B’s melee attack.

That would mean that a ranged attacker (A) standing right around the corner of a melee attacker (B) can shoot the melee attacker without penalty and without risking attacks of opportunity. That does not feel right.

On the other hand – if a line running along a wall grants cover you could not shoot down a straight hallway without cover. (See image below) That does not feel right either.

enter image description here

Cover the maximum of elements

I have a collection of subsets $ \{S_1,\ldots,S_m\}$ where each $ S_i\subset \{1,\ldots,n\}$ . I would like to cover the maximum number of elements from $ \{1,\ldots,n\}$ by choosing a single element from each $ S_i$ . What is the optimal way to do this?

For example, say I have $ S_1=\{1\}$ and $ S_2=\{2,3\}$ and $ S_3=\{3\}$ and $ n=3$ . If my algorithm picks randomly (or the maximum number say) a number from each $ S_i$ , then I could obtain a solution that covers only $ \{1,3\}$ but there is a solution that covers all elements.

I just bought a cannon rebel t6, I’m new to photography and I’m confused as to how to know what size filter or pedal cover to buy? [duplicate]

This question already has an answer here:

  • How do I find the right size of filters for a lens? 6 answers

I know it sounds like a vacuous question, however I have not been able to find info on this topic. Sizing of filter and lenses. I bought some filters for my camera and they didn’t fit. Camera sets 55mm so I bought 55mm. Wrong!. Any help out there?

Vertex Cover Problem Greedy Solution

As far as I understood this problem, it is a subset of vertices of Graph G, such that every edge has at least one endpoint in the subset. This problem is considered to be NP Complete. However I think a polynomial time greedy solution exists for this problem. I have tested this greedy solution on 12 common instances and it seems to produce the right results.

Either I have misunderstood the problem, or my solution is not polynomial time. Please visit the link below for 12 instances explained with diagram and the code executes all the 12 instances in the same order. Nodes in diagram marked with green are the vertices that should be in the subset.

Problems With Diagrams

''' Vertex Cover Problem - Greedy approach for finding optimal solution '''  # case 1 case_1 = {'a': ['b', 'c'], 'b': ['a', 'c', 'd', 'e'], 'c': ['a', 'b', 'd'],          'd': ['c', 'b', 'e'], 'e': ['b', 'd']}  # case 2 case_2 = {'a': ['f'], 'b': ['f'], 'c': ['f'],          'd': ['f'], 'e': ['f'], 'f': ['a', 'b', 'c', 'd', 'e', 'g'], 'g': ['f']}  # case 3 case_3 = {'a': ['f'], 'b': ['f', 'c'], 'c': ['f', 'd', 'b'],          'd': ['f', 'c'], 'e': ['f'], 'f': ['a', 'b', 'c', 'd', 'e', 'g'], 'g': ['f']}  # case 4 case_4 = {'a': ['f'], 'b': ['f', 'c'], 'c': ['f', 'd', 'b'],          'd': ['f'], 'e': ['f'], 'f': ['a', 'b', 'c', 'd', 'e', 'g'], 'g': ['f']}  # case 5 case_5 = {'a': ['b', 'd'], 'b': ['a', 'c', 'd', 'e'], 'c': ['b', 'f', 'e'],          'd': ['a', 'b', 'e'], 'e': ['b', 'c', 'f'], 'f': ['c', 'e']}  # case 6 case_6 = {'a': ['d', 'b'], 'b': ['a', 'e', 'f', 'c'], 'c': ['b', 'd'],          'd': ['a', 'c', 'f', 'e'], 'e': ['b', 'd', 'f'], 'f': ['b', 'd', 'e']}  # case 7 case_7 = {'a': ['b','c'], 'b': ['a','c','d','e','f'], 'c': ['b','a'],          'd': ['b'], 'e': ['b'], 'f': ['b']}  # case 8 case_8 = {'a': ['b','c'], 'b': ['a','c','d'], 'c': ['b','a', 'e'],          'd': ['b','f','e'], 'e': ['d','c'], 'f': ['d']}  # case 9 case_9 = {'a': ['b', 'f'], 'b': ['a', 'c'], 'c': ['b', 'd'],          'd': ['c', 'a'], 'e': ['d', 'f'], 'f': ['e', 'a']}  # case 10 case_10 = {'a': ['b'], 'b': ['c'], 'c': ['d'],          'd': ['e'], 'e': ['f'], 'f': ['a']}  # case 11 case_11 = {'a': ['b', 'c', 'd', 'e', 'f'], 'b': ['c', 'a', 'd', 'e', 'f'], 'c': ['d', 'a', 'b', 'e', 'f'],          'd': ['e', 'a', 'b', 'c', 'f'], 'e': ['f', 'a', 'b', 'c', 'd'], 'f': ['a', 'b', 'c', 'd', 'e']}  # case 12 case_12 = {'a': ['b', 'c'], 'b': ['d', 'a'], 'c': ['a', 'e'],          'd': ['b', 'f', 'g'], 'e': ['h', 'i', 'j'], 'f': ['k', 'l', 'm', 'd'],          'g': ['n', 'o', 'p', 'd'], 'h': ['e'], 'i': ['e'], 'j': ['q', 'e'], 'k': ['f'], 'l': ['f'], 'm': ['f'],         'n': ['g'], 'o': ['g'], 'p': ['g'], 'q': ['j']}  cases = [case_1, case_2, case_3, case_4, case_5, case_6, case_7, case_8, case_9, case_10, case_11, case_12]  class Node(object):     def __init__(self, name):         self.name = name         self.adj_list = []         self.degree = -1  class Edge(object):     def __init__(self, node1, node2, weight=0):         self.node1 = node1         self.node2 = node2         self.weight = weight      def __str__(self):         return 'Node 1: %s, Node 2: %s' % (self.node1.name, self.node2.name)      def __repr__(self):         return '**Node 1: %s, Node 2: %s**' % (self.node1.name, self.node2.name)  def name_of_highest_degree(nodes):     h = -1     k = None     for key in nodes:         if nodes[key].degree > h:             h = nodes[key].degree             k = nodes[key]      return k  # create Edges and Nodes def vertex_cover(edges, number):     total_edges = 0     nodes = {}     cover = []      for a in edges:         n = Node(a)         nodes[a] = n      for n in edges:         node = nodes[n]         for e in edges[n]:             edge = Edge(node, nodes[e])             node.adj_list.append(edge)             node.degree += 1             total_edges += 1      # Actual algorithm     while total_edges > 0:         pick_n = name_of_highest_degree(nodes)         cover.append(pick_n)         for key in nodes:             curr_node = nodes[key]             j = 0             while True:                 if len(curr_node.adj_list) <= 0:                     break                  if j >= len(curr_node.adj_list):                     break                  edge = curr_node.adj_list[j]                 if edge.node2.name == pick_n.name:                     curr_node.degree -= 1                     del curr_node.adj_list[j]                     total_edges -= 1                     continue                  if edge.node1.name == pick_n.name:                     del curr_node.adj_list[j]                     total_edges -= 1                     continue                  j += 1          del nodes[pick_n.name]       print('Case %d: ' % number, end='')     for c in cover:         print(c.name, end=' ')     print()  for i in range(len(cases)):     vertex_cover(cases[i], i + 1) 

Any review is highly appreciated.

Does an fppf cohomological class annihilated by an etale cover come from etale cohomological group?

Let $ X$ be a scheme, $ F$ a sheaf on the fppf site of $ X$ , and $ \alpha\in H^i_{\mathrm{fppf}}(X,F)$ such that it is trivialized by an etale cover of $ X$ . Does $ \alpha$ lie in the image of the canonical map $ $ H^i_{\mathrm{\acute{e}t}}(X,F)\rightarrow H^i_{\mathrm{fppf}}(X,F)?$ $ I think the answer is yes for $ i=1$ . Let $ \varepsilon$ be the forgetful map from the fppf site to the etale site. Since the Leray spectrals sequence $ H^p_{\mathrm{\acute{e}t}}(X,R^q\varepsilon_*F)$ gives a short exact sequence $ $ 0\rightarrow H^1_{\mathrm{\acute{e}t}}(X,F)\xrightarrow{f} H^1_{\mathrm{fppf}}(X,F)\xrightarrow{g} H^0_{\mathrm{\acute{e}t}}(X,R^1\varepsilon_*F)$ $ Since $ \alpha$ is trivialized by some etale cover, $ g(\alpha)=0$ . Hence $ \alpha\in\mathrm{Im}(f)$ .

More generally, how about the situation if we replace etale (resp. fppf) by $ E_1$ (resp. $ E_2$ )? Here $ E_1,E_2$ are two Grothendieck topologies such that $ E_2$ is finer than $ E_1$ ?

Password Outer cover with slight damage

I need to travel to Germany this coming January 14th for an interview. The travel is only for 4 days. I have submitted all the relevant and supporting documents for getting the travel schengen visa. When I submitted my passport to VFS they told me the passport is damaged. But the damage is only to the over cover towards to the edges like as shown below. The tickets are all booked using this passport number so I cannot apply for a new one at this moment of time

enter image description here Like to know whether my application will be accepted or rejected.

How do you find cover of keywords in a sentence?

I am trying to optimize a program, where I need to find the cover of keywords in the sentence. I believe using the dictionary is the only way to optimize it. Any other technique so that I can get better time complexity? The below python script is my version of the code, this works for a small sentence with a time complexity O(len(keywords)) + O(frequency_table CONSTRUCTION TIME). Space complexity is not a problem, but time.

def cover_test(keys, sentence):     frequency_table = collections.Counter(sentence)     count = 0     for key in keys:         if key in frequency_table:             count += 1     return count == len(keys)  cover_test("word1 word4".split(), "word2 word1 word3 word4".split()) # output  # True, because word1 and word4 is present in the sentense  

Book and cover designer for $110

Hello writer or publisher, If you wrote a book and plan to prepare for publish or online use this is the right place. Please handle me the text and guidelines and you will deliver proffesional book layout design. My 10 years experience will help you to choose the right format layout and looking. This offer is for books that are up to 80 pages. Regards

by: erzentech
Created: —
Category: Art & Design
Viewed: 218


set cover where only certain special subsets are allowed

I am trying to solve a problem which turns out to be a form of the set cover problem. I’ve implemented the greedy Set cover approximation algorithm for set cover, but it turns out to not be accurate enough for my needs.

Specifically I am trying to find the smallest list of sets, from a fixed, finite, list of special sets, which cover a given set. This seems like it should make the problem easier to solve than set cover. My sets also have a known maximum size which should also make this easier to solve.

A toy version of the problem is as follows:

Let $ U$ be the set $ \{a,b,c,d,e,f,g,h\}$ . All the sets we mention from here on will be subsets of this set.

Let $ S$ be a list of special sets. For this version of the problem we can use the following list:

$ $ S = [\{a,b,c,d,e,f,g,h\}, \{a,b,c,d\}, \{e,f,g,h\}, \{a,e\}, \{b,f\}, \{c,g\}, \{d,h\}, \{a,b\}, \{c,d\}, \{e,f\}, \{g,h\}, \{a\}, \{b\}, \{c\}, \{d\}, \{e\}, \{f\}, \{g\}, \{h\}]$ $

For a given set $ G$ what is the smallest list of sets which are part of $ S$ which cover $ G$ , (that is where the union of the sets in the list is $ G$ ).

For the above toy problem, the greedy approximation I’ve implemented, if presented with a set like $ \{b, c, g, h\}$ , produces $ [\{c, g\}, \{b\}, \{h\}]$ instead of the smaller list $ [\{b, c\}, \{g, h\}]$ .

Has this sort of problem been well studied? Is there a known non-approximate algorithm given the additional constraints, that would be better than naive dynamic programming?

Which downtime activities cover lifestyle expenses?

I am puzzled by the interaction between Lifestyle and Downtime Activities, particularly as to lifestyle expenses.

One of the downtime options presented in the Player’s Handbook, p. 187, is Researching, which expressly states:

For each day of research, you must spend 1 gp to cover your expenses. This cost is in addition to your normal lifestyle expenses . . . .

More downtime options appear in the Dungeon Master’s Guide and Xanathar’s Guide to Everything, including several that have associated gold-per-day costs. But none of them state that their costs are in addition to a PC’s lifestyle expenses.

At the same time, certain downtime activities go out of their way to say lifestyle expenses are or might be covered during the activity. For example, Work, XGtE p. 134, contemplates an ability check the outcome of which determines what lifestyle one can maintain without cost during the activity. And Crafting, PHB p. 187, simply says:

While crafting, you can maintain a modest lifestyle without having to pay 1 gp per day, or a comfortable lifestyle at half the normal cost . . . .

In other words, the cost of Crafting subsumes one’s lifestyle costs, at least to an extent. Adding to the confusion is the fact that the downtime options in XGtE are wholly optional “alternatives” that differ from options in the PHB and DMG. There is basically no consistency among them.

Even more confusing, the DMG says, at p. 128, that while engaged in Carousing, a PC “spends money as though maintaining a wealthy lifestyle . . . .” (Emphasis mine.) To my eyes, that “as though” is ambiguous. Does the PC spend money on her normal lifestyle and on the wealthy lifestyle necessary for Carousing? Or does the later subsume the former, as with the PHB‘s version of Crafting?

In short: which downtime activities cover a PC’s lifestyle expenses while performing them, and which don’t?