added two possible solutions for partitioning items equally to a number of bags to my Python training material:

https://github.com/hofmannedv/training-python/tree/master/usecases/knapsack-or-basket

#Python #algorithms #Knapsack #partitioning

added three possible solutions for the Knapsack problem to my Python training material:

https://github.com/hofmannedv/training-python/tree/master/usecases/knapsack-or-basket

#Python #training #Knapsack #algorithm

training-python/usecases/knapsack-or-basket at master · hofmannedv/training-python

data and documentation for python trainings. Contribute to hofmannedv/training-python development by creating an account on GitHub.

GitHub

Всё про динамическое программирование 1 (гайд, трюки, оптимизации, dynamic programming)

https://videos.viorsan.com/w/mwT7iL7Ew3bFUtcZv2PZL8

Всё про динамическое программирование 1 (гайд, трюки, оптимизации, dynamic programming)

PeerTube
@bundjugend In #Hürth #Knapsack werden zumindest 2 #BASF Anlagen geschlossen.

Approximately Counting Knapsack Solutions in Subquadratic Time

Weiming Feng, Ce Jin
https://arxiv.org/abs/2410.22267 https://arxiv.org/pdf/2410.22267 https://arxiv.org/html/2410.22267

arXiv:2410.22267v1 Announce Type: new
Abstract: We revisit the classic #Knapsack problem, which asks to count the Boolean points $(x_1,\dots,x_n)\in\{0,1\}^n$ in a given half-space $\sum_{i=1}^nW_ix_i\le T$. This #P-complete problem admits $(1\pm\epsilon)$-approximation. Before this work, [Dyer, STOC 2003]'s $\tilde{O}(n^{2.5}+n^2{\epsilon^{-2}})$-time randomized approximation scheme remains the fastest known in the natural regime of $\epsilon\ge 1/polylog(n)$. In this paper, we give a randomized $(1\pm\epsilon)$-approximation algorithm in $\tilde{O}(n^{1.5}{\epsilon^{-2}})$ time (in the standard word-RAM model), achieving the first sub-quadratic dependence on $n$. Such sub-quadratic running time is rare in the approximate counting literature in general, as a large class of algorithms naturally faces a quadratic-time barrier.
Our algorithm follows Dyer's framework, which reduces #Knapsack to the task of sampling (and approximately counting) solutions in a randomly rounded instance with poly(n)-bounded integer weights. We refine Dyer's framework using the following ideas:
- We decrease the sample complexity of Dyer's Monte Carlo method, by proving some structural lemmas for typical points near the input hyperplane via hitting-set arguments, and appropriately setting the rounding scale.
- Instead of running a vanilla dynamic program on the rounded instance, we employ techniques from the growing field of pseudopolynomial-time Subset Sum algorithms, such as FFT, divide-and-conquer, and balls-into-bins hashing of [Bringmann, SODA 2017].
We also need other ingredients, including a surprising application of the recent Bounded Monotone (max,+)-Convolution algorithm by [Chi-Duan-Xie-Zhang, STOC 2022] (adapted by [Bringmann-D\"urr-Polak, ESA 2024]), the notion of sum-approximation from [Gawrychowski-Markin-Weimann, ICALP 2018]'s #Knapsack approximation scheme, and a two-phase extension of Dyer's framework for handling tiny weights.

Approximately Counting Knapsack Solutions in Subquadratic Time

We revisit the classic #Knapsack problem, which asks to count the Boolean points $(x_1,\dots,x_n)\in\{0,1\}^n$ in a given half-space $\sum_{i=1}^nW_ix_i\le T$. This #P-complete problem admits $(1\pmε)$-approximation. Before this work, [Dyer, STOC 2003]'s $\tilde{O}(n^{2.5}+n^2{ε^{-2}})$-time randomized approximation scheme remains the fastest known in the natural regime of $ε\ge 1/polylog(n)$. In this paper, we give a randomized $(1\pmε)$-approximation algorithm in $\tilde{O}(n^{1.5}{ε^{-2}})$ time (in the standard word-RAM model), achieving the first sub-quadratic dependence on $n$. Such sub-quadratic running time is rare in the approximate counting literature in general, as a large class of algorithms naturally faces a quadratic-time barrier. Our algorithm follows Dyer's framework, which reduces #Knapsack to the task of sampling (and approximately counting) solutions in a randomly rounded instance with poly(n)-bounded integer weights. We refine Dyer's framework using the following ideas: - We decrease the sample complexity of Dyer's Monte Carlo method, by proving some structural lemmas for typical points near the input hyperplane via hitting-set arguments, and appropriately setting the rounding scale. - Instead of running a vanilla dynamic program on the rounded instance, we employ techniques from the growing field of pseudopolynomial-time Subset Sum algorithms, such as FFT, divide-and-conquer, and balls-into-bins hashing of [Bringmann, SODA 2017]. We also need other ingredients, including a surprising application of the recent Bounded Monotone (max,+)-Convolution algorithm by [Chi-Duan-Xie-Zhang, STOC 2022] (adapted by [Bringmann-Dürr-Polak, ESA 2024]), the notion of sum-approximation from [Gawrychowski-Markin-Weimann, ICALP 2018]'s #Knapsack approximation scheme, and a two-phase extension of Dyer's framework for handling tiny weights.

arXiv.org

Approximately Counting Knapsack Solutions in Subquadratic Time http://arxiv.org/abs/2410.22267v1

Authors: Weiming Feng, Ce JinWe revisit the classic #Knapsack problem, which asks to count the Boolean
points $(x_1,dots,x_n)in{0,1}^n$ in a given half-space
$sum_{i=1}^nW_ix_ile T$. This #P-complete problem admits
$(1pmepsilon)$-approximation. Before this work, [Dyer, STOC 2003]'s
$tilde{O}(n^{2.5}+n^2{epsilon^{-2}})$-time randomized approximation scheme
remains the fastest known in the

Approximately Counting Knapsack Solutions in Subquadratic Time

We revisit the classic #Knapsack problem, which asks to count the Boolean points $(x_1,\dots,x_n)\in\{0,1\}^n$ in a given half-space $\sum_{i=1}^nW_ix_i\le T$. This #P-complete problem admits $(1\pmε)$-approximation. Before this work, [Dyer, STOC 2003]'s $\tilde{O}(n^{2.5}+n^2{ε^{-2}})$-time randomized approximation scheme remains the fastest known in the natural regime of $ε\ge 1/polylog(n)$. In this paper, we give a randomized $(1\pmε)$-approximation algorithm in $\tilde{O}(n^{1.5}{ε^{-2}})$ time (in the standard word-RAM model), achieving the first sub-quadratic dependence on $n$. Such sub-quadratic running time is rare in the approximate counting literature in general, as a large class of algorithms naturally faces a quadratic-time barrier. Our algorithm follows Dyer's framework, which reduces #Knapsack to the task of sampling (and approximately counting) solutions in a randomly rounded instance with poly(n)-bounded integer weights. We refine Dyer's framework using the following ideas: - We decrease the sample complexity of Dyer's Monte Carlo method, by proving some structural lemmas for typical points near the input hyperplane via hitting-set arguments, and appropriately setting the rounding scale. - Instead of running a vanilla dynamic program on the rounded instance, we employ techniques from the growing field of pseudopolynomial-time Subset Sum algorithms, such as FFT, divide-and-conquer, and balls-into-bins hashing of [Bringmann, SODA 2017]. We also need other ingredients, including a surprising application of the recent Bounded Monotone (max,+)-Convolution algorithm by [Chi-Duan-Xie-Zhang, STOC 2022] (adapted by [Bringmann-Dürr-Polak, ESA 2024]), the notion of sum-approximation from [Gawrychowski-Markin-Weimann, ICALP 2018]'s #Knapsack approximation scheme, and a two-phase extension of Dyer's framework for handling tiny weights.

arXiv.org

Report-K

Das Symbolbild zeigt eine industrielle Anlage bei Nacht.

Köln | Im Chemiepark Knapsack in Hürth ist es in der Nacht von Dienstag auf Mittwoch, 9. und 10. Mai 2024, zu einer Fackeltätigkeit gekommen. Zwischen 22:30 Uhr und 00:30 Uhr verbrannte bei LyondellBasell einen Stoff kontrolliert als Sicherheitsmaßnahme, teilte der Chemiepark mit.

Dabei war ein Feuerschein und Ruß sichtbar sowie ein Geräusch zu vernehmen. Die zuständigen Behörden seien informiert worden, so das Notfallmanagement des Chemieparks.

Die Anlage verarbeitet Propylen, einen gasförmigen Kohlenwasserstoff, zu Kunststoffgranulaten und Pulver. Daraus werden alltägliche Gegenstände wie Folien, Verpackungen, Wasserrohre oder Autoteile hergestellt.

Zur Quelle wechseln

https://www.bachhausen.de/fackeltaetigkeit-im-chemiepark-knapsack-in-huerth/

#chemiepark #fackeltatigkeit #hurth #knapsack

Fackeltätigkeit im Chemiepark Knapsack in Hürth - Report-K

Report-K ist die Internetzeitung von Köln und berichtet aus Köln, NRW, Deutschland und der Welt.

Report-K

#Vergänglichkeit

This photo was taken in the old cemetery in #Hürth #Knapsack. It depicts one of dozens of bells affixed to a holly. Each bell represents a child who was lost to the community during the Second World War.

@norberteder
#photography #Fotografie #EOS5DMKIV
#52weekphotochallenge2024 #52wochenfotochallenge2024
#52weekphotochallenge
#52wochenfotochallenge
#silentsunday

The Apache Groovy programming language - Blogs - Solving the Knapsack Problem with Groovy

This post looks at solving the knapsack problem with Groovy.

#Bitterfeld und #Hürth #Knapsack bei #Köln als Beispiel: #Cyanid . #Arsen und andere hochgiftige Stoffe verseuchen als Abfallprodukte der #Chemiepark|s den Boden und das Wasser. Das Dorf Knapsack wurde in den 1970er deshalb abgerissen, aber in den durch die Altlasten sauren Seen wurde bis in die 2000er Jahre geangelt und bis heute geschwommen. Vor der Öffentlichkeit wird das möglichst nicht thematisiert.
Erschreckende und sehr sehenswerte Recherche
Edit: Link aktualisiert
https://www.youtube.com/watch?v=xp5oNRCH4o8
Vergifteter Boden, verseuchtes Wasser - Wie Chemie-Altlasten Generationen belasten | Doku

YouTube