Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Notices by Kyle (khird@qoto.org)

  1. Kyle (khird@qoto.org)'s status on Friday, 10-Jan-2020 17:26:12 UTC Kyle Kyle
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱
    • codesections

    @codesections @freemo

    I prefer "resign" because it can actually be ambiguous in sentences, while "cleave" can be disambiguated by the presence or absence of a direct object. Suppose you see a headline "Star Player Resigns" - it can mean either that he quit (ri-ZINE) or that he signed a contract extension to continue playing (REE-sine).

    In conversation Friday, 10-Jan-2020 17:26:12 UTC from qoto.org permalink
  2. Kyle (khird@qoto.org)'s status on Sunday, 01-Dec-2019 18:07:10 UTC Kyle Kyle
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @freemo

    The case where a is an integer but not a natural number can be excluded because primes are a subset of the natural numbers. If a < 1, then p = a³ - 1 < 0 which contradicts p's primality.

    In conversation Sunday, 01-Dec-2019 18:07:10 UTC from qoto.org permalink
  3. Kyle (khird@qoto.org)'s status on Sunday, 01-Dec-2019 18:02:16 UTC Kyle Kyle
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @freemo

    Assume the opposite: some cube a³ = p + 1 for some natural number a ≠ 2 and prime p.

    The difference of cubes formula shows that:
    p = a³ - 1 = (a² + a + 1)(a - 1)

    Both terms (a² + a + 1) and (a - 1) are integers. Since p is prime, it follows that exactly one of the two must be equal to unity.

    The first possibility can be ruled out because a² + a + 1 = 1 has no solution in the natural numbers.

    The second is impossible because a - 1 = 1 contradicts the assumption a ≠ 2.

    In conversation Sunday, 01-Dec-2019 18:02:16 UTC from qoto.org permalink
  4. Kyle (khird@qoto.org)'s status on Thursday, 17-Oct-2019 03:41:07 UTC Kyle Kyle

    Here is a #toyprogrammingchallenge which corresponds to the general case of a problem I ran up against recently.

    Given a positive integer K and a directed graph G with weighted edges, return a new graph H satisfying all the following conditions, if such a graph exists:

    1. G and H contain exactly the same set of vertices.
    2. H contains only edges in G, but G may contain edges not in H.
    3. A path exists in H of length at most K between each pair of vertices in each direction.
    4. No edge can be removed from H while still satisfying condition 3.

    Where more than one graph exists satsifying these conditions, return the one with the least total weight. You may assume G does not contain edges with negative weights.

    Here is an example G, each triplet representing the <start, end, weight> of an edge:
    <1, 2, 40>
    <1, 3, 12>
    <1, 4, 50>
    <2, 1, 84>
    <2, 3, 19>
    <2, 4, 69>
    <3, 1, 25>
    <3, 2, 78>
    <3, 4, 93>
    <4, 1, 75>
    <4, 2, 36>
    <4, 3, 96>

    Your program should produce the following H given the above G and K = 2:
    <1, 2, 40>
    <1, 4, 50>
    <2, 1, 84>
    <2, 3, 19>
    <3, 1, 25>
    <4, 2, 36>

    In conversation Thursday, 17-Oct-2019 03:41:07 UTC from qoto.org permalink
  5. Kyle (khird@qoto.org)'s status on Thursday, 17-Oct-2019 00:35:33 UTC Kyle Kyle
    • 🎓 Dr. Freemo :jpf: 🇳🇱
    • La Fée Verte

    @Absinthe

    The code isn't that bad, you just have to be careful you don't go down a dead end with your algorithm. It's much easier to add error checking etc. at the end if you designed a versatile solution than it is to try and generalise one of the more brittle ones.

    Would you mind if I suggested a challenge? I have one involving graph manipulation, which is kind of up @freemo's alley.

    In conversation Thursday, 17-Oct-2019 00:35:33 UTC from qoto.org permalink
  6. Kyle (khird@qoto.org)'s status on Thursday, 03-Oct-2019 15:02:28 UTC Kyle Kyle
    in reply to
    • La Fée Verte

    @Absinthe

    Linear in time and space by taking advantage of the Fibonacci numbers.

    function count = interpretations(string)
    ambig = string(1:end-1) == '1' | (string(1:end-1) == '2' & string(2:end) <= '6');
    ambig &= string(1:end-1) ~= '0' & string(2:end) ~= '0' & [string(3:end) '1'] ~= '0';
    ambig = [false ambig false];
    consec = find(ambig(1:end-1) & !ambig(2:end)) - find(!ambig(1:end-1) & ambig(2:end));

    fibo = zeros(max(consec), 1);
    fibo(1:2) = [2 3];
    for i = 3:max(consec)
    fibo(i) = fibo(i - 1) + fibo(i - 2); end;
    count = prod(arrayfun(@(x)fibo(x), consec)); end;

    In conversation Thursday, 03-Oct-2019 15:02:28 UTC from qoto.org permalink
  7. Kyle (khird@qoto.org)'s status on Thursday, 29-Aug-2019 23:53:45 UTC Kyle Kyle
    in reply to
    • QOTO Announcements & Polls

    @QOTO Keep in mind the inherent sampling bias when you rely on user engagement (responses to this poll) to evaluate attitudes toward engagement as a criterion for benefits.

    In conversation Thursday, 29-Aug-2019 23:53:45 UTC from qoto.org permalink
  8. Kyle (khird@qoto.org)'s status on Friday, 09-Aug-2019 19:09:24 UTC Kyle Kyle
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @freemo Nice. Not that I'll block either - I'm just in favour of techniques like this that give users more control over what content they want to see. Played a big role in me choosing this instance in the first place.

    In conversation Friday, 09-Aug-2019 19:09:24 UTC from qoto.org permalink

User actions

    Kyle

    Kyle

    Tags
    • (None)

    Following 0

      Followers 0

        Groups 0

          Statistics

          User ID
          16742
          Member since
          11 Jan 2019
          Notices
          8
          Daily average
          0

          Feeds

          • Atom
          • Help
          • About
          • FAQ
          • Privacy
          • Source
          • Version
          • Contact

          Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

          Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.